Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
1.0.0:physics [2023/03/16 09:21] – [ColliderSettings / ColliderPrefab] admin | 1.0.0:physics [2023/03/16 14:18] (current) – [Override Collider-Registration] admin | ||
---|---|---|---|
Line 383: | Line 383: | ||
When you have declared this kind of helper class in your unit, the TGorillaPhysicsSystem component will then show you a new method to be callable " | When you have declared this kind of helper class in your unit, the TGorillaPhysicsSystem component will then show you a new method to be callable " | ||
+ | |||
+ | ==== Render Colliders ==== | ||
+ | |||
+ | You can render physics colliders for debugging purposes. | ||
+ | |||
+ | The most easy way is to insert a TDummy component into your TGorillaViewport and leave all transformation (position, rotation and scaling) zero, to not affect collider rendering. | ||
+ | The add a " | ||
+ | |||
+ | <file pascal> | ||
+ | uses | ||
+ | Gorilla.Physics.Q3.Renderer; | ||
+ | |||
+ | const | ||
+ | {$IFDEF DEBUG} | ||
+ | SHOW_PHYSICS_COLLIDERS = true; | ||
+ | {$ELSE} | ||
+ | SHOW_PHYSICS_COLLIDERS = false; | ||
+ | {$ENDIF} | ||
+ | |||
+ | procedure TForm1.Dummy1Render(Sender: | ||
+ | var LRender : TQ3Render; | ||
+ | begin | ||
+ | // Check if we want to see physics colliders | ||
+ | if not SHOW_PHYSICS_COLLIDERS then | ||
+ | Exit; | ||
+ | |||
+ | // Here we render physics colliders for debugging | ||
+ | LRender.Context := Context; | ||
+ | GorillaPhysicsSystem1.Engine.Render(@LRender); | ||
+ | end; | ||
+ | </ | ||
Next step: [[fmodaudio|FMOD Audio]] | Next step: [[fmodaudio|FMOD Audio]] |