Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: app_advisory on June 12, 2014, 06:58:25 AM

Title: Collision issue when moving object with "Translate" action [SOLVED]
Post by: app_advisory on June 12, 2014, 06:58:25 AM
Hi,

I don't know why, but when I move my sphere continuously with a translation, the sphere enter a little bit inside a wall when there is a contact between the sphere and a wall..

I attached a little video, and my FSM and the inspector of my sphere.

Thank you very much for your help ...

Regards,

Anthony


my FSM : https://www.dropbox.com/s/nvohgkdvq5rd9pd/Capture%20d%E2%80%99%C3%A9cran%202014-06-12%20%C3%A0%2012.51.04.png (https://www.dropbox.com/s/nvohgkdvq5rd9pd/Capture%20d%E2%80%99%C3%A9cran%202014-06-12%20%C3%A0%2012.51.04.png)

Inspector : https://www.dropbox.com/s/1ec3numdfx33lbp/Capture%20d%E2%80%99%C3%A9cran%202014-06-12%20%C3%A0%2012.52.15.png (https://www.dropbox.com/s/1ec3numdfx33lbp/Capture%20d%E2%80%99%C3%A9cran%202014-06-12%20%C3%A0%2012.52.15.png)

Video :
https://www.dropbox.com/s/kq4nfu3t6j2mprz/tile%20collision.mp4 (https://www.dropbox.com/s/kq4nfu3t6j2mprz/tile%20collision.mp4)
Title: Re: Collision issue when moving object with "Translate" action
Post by: jayf on June 12, 2014, 10:46:56 AM
Hi.

The first thought that came to my mind is maybe you should try increasing the radius of the Sphere's collider? Or try a cube collider? (Incase you haven't done so) Sorry I'm rather new to Playmaker myself and that's all I can think off.  ;)
Title: Re: Collision issue when moving object with "Translate" action
Post by: app_advisory on June 12, 2014, 10:48:14 AM
I'm new too ;)

What's the consequence of the increase of the radius ?

Title: Re: Collision issue when moving object with "Translate" action
Post by: app_advisory on June 12, 2014, 10:49:27 AM
I saw it change the "collision" surface but .. It didn't change anything
Title: Re: Collision issue when moving object with "Translate" action
Post by: Alex Chouls on June 12, 2014, 07:08:04 PM
In general you should move a Rigid Body using forces instead of Translate. Translate overrides the physics simulation causing weird behavior.

Or you could use Set Velocity to set the velocity directly.

Or use a Character Controller and Controller Move or Controller Simple Move actions.

There are pros and cons to each approach, so it would depend on the needs of your game...
Title: Re: Collision issue when moving object with "Translate" action
Post by: jayf on June 12, 2014, 10:36:07 PM
I saw it change the "collision" surface but .. It didn't change anything

Oh ok nevermind then. I keep thinking Collision has something to do with the objects physics, but Alex Chouls is right, I think you'd have to do something with the Rigid Body to solve this.
Title: Re: Collision issue when moving object with "Translate" action
Post by: app_advisory on June 13, 2014, 05:39:09 AM
Hi,

You're right : set velocity is better ..

And it solves my issue thanks a lot !!