Jump to content

Collision with character controller


OneHitWonder
 Share

Recommended Posts

Hello,

I have just implemented click movement for my player using the GoToPoint() method. It works ok but if I increase the speed the character can overshoot the mark resulting in a sort of sling shot until it looses momentum. 

I had an idea to draw a physical object at the clicked location and on collision the player will stop. It seems however that the player just walks on by and right through the object. What settings do I need to adjust on the object to allow the player to collide? So far I have set the collision type to Scene.

self.cursor:SetCollisionType(Collision.Scene)

I did wonder if I needed to setup any physics for the object but ideally I didn't want the object to move, but I noticed the documentation for SetPhysicsMode() has an example which doesn't actually use the method.

https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetPhysicsMode

Cheers.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...