# Need Help Making Collision with Ground Work Correctly

**URL:** <https://forum.castle-engine.io/t/need-help-making-collision-with-ground-work-correctly/1025>\
**Category:** Uncategorized\
**Created:** [December 12, 2023, 4:08pm UTC](https://forum.castle-engine.io/t/need-help-making-collision-with-ground-work-correctly/1025 "2023-12-12T16:08:58Z")\
**Posts on this page:** 1\
**Showing post:** 62

<div class="post-metadata">

**Author:** ![JPF12141999](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/jpf12141999/32/1218_2.png) [@JPF12141999](https://forum.castle-engine.io/u/JPF12141999)\
**Post date:** [February 2, 2024, 12:32pm UTC](https://forum.castle-engine.io/t/need-help-making-collision-with-ground-work-correctly/1025/62 "2024-02-02T12:32:43Z")

</div>

Excellent.

Now that that is clarified, I need help understanding in the code, how to access Sandy’s Transform to set the location of the vertices precisely at where I want them, to match the direction of them, because by default it won’t recognize SandyTransform because I didn’t define it.

I know in other examples I find, you do it like this:

```auto
procedure TEnemy.TakeDamageFromBullet(const Bullet: TCastleTransform);
begin
  SoundEngine.Play(NamedSound('HitEnemy'));
  Bullet.Exists := false;

  Dead := true;
  RBody.Exists := false;
end;

```

Where the important detail is specifying the thing you want to access from the scene, in parenthesis next to the function name.

However, I believe in this case that won’t work, because the RenderUnlitMesh procedures are pre-designed in a very specific way, as we went over earlier, and so it will most likely not work as the same function but rather be treated as something foreign/unknown, if I specify parameters for the CreateMesh function.

Is the solution perhaps to have another function nested inside, that I can define as my own/custom?

---

_[View the full topic](https://forum.castle-engine.io/t/need-help-making-collision-with-ground-work-correctly/1025)._
