Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ptrlo on October 30, 2014, 08:23:18 AM

Title: How to clamp ship?
Post by: ptrlo on October 30, 2014, 08:23:18 AM
In a top down space ship game I need to clamp it so it doesn't go off screen, how do I achieve this? I store the ships X and clamp it, but it does nothing.
Title: Re: How to clamp ship?
Post by: Lane on October 30, 2014, 08:53:42 AM
Add colliders where you don't want to allow it to go.
Title: Re: How to clamp ship?
Post by: ptrlo on October 30, 2014, 09:33:02 AM
I tried that method as well, but for some reason my ship will not collide. I'ts a custom mesh, and the walls are basic cubes. They all have rigidbodies, etc.
Title: Re: How to clamp ship?
Post by: Lane on October 30, 2014, 10:34:10 AM
Did you add colliders on both your ship and the walls? Are you moving it with Translate?
Title: Re: How to clamp ship?
Post by: ptrlo on October 31, 2014, 03:19:28 AM
Checked colliders and countless other things.

Yes, I am moving it with translate.
Title: Re: How to clamp ship?
Post by: Lane on October 31, 2014, 10:35:46 AM
You need to move it with forces, translate is changing the position and ignoring physics.