Collide without breaking
I have a movable platform in an scene without gravity. The platform goes right to left and return, and i have actor who falls of the sky and hit the platform, the problem is that when he does that the platform breaks and goes down with him, is there a way to fix that, and make the platform hold the position when it collides with the actor.
Best Answer
-
jckmcgraw Posts: 647
Create a real attribute in the moving platform called "startY".
Put in a change attribute: startY to self.pos.y.
Then put in a constrain attribute: self.pos.y to startY.
Go into self.physics.FixedRotation and set it to true.
Now, your platform will be able to move freely along the x axis, but the y axis is constrained, as well as the rotation.
Hope this helps,
Jack McGraw
Answers
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Jack