playMaker

Author Topic: Get Position / Set Position doesn't work properly?  (Read 729 times)

stellarGameLove

  • Playmaker Newbie
  • *
  • Posts: 6
Get Position / Set Position doesn't work properly?
« on: March 23, 2021, 03:24:37 PM »
So, i have this Rigidbody Character Controller and i wanted to make the checkpoint that will teleport the player to the interior under the map. So, i made trigger and entering the trigger will activate the next state, where get position (position of the spawning point inside interior) and set position (setting the vector3 position that i got from get position, on Rigidbody Character Controller). And trigger works well, the player teleports inside the interior for a second (if i press Every Frame) and then gets back to the original position when the state switches back to the trigger state again.

So what's the problem? Why my player won't stay on the position? And even if it stays for a second or 2, it cannot move at all. What's the problem?

I tried everything but character just won't stay inside the interior (the character will stay in interior if i cut the connection with the trigger state, but i won't be able to move, and it will stay only if the set position is the last action in the state).

Thank you very much for the help.



djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Get Position / Set Position doesn't work properly?
« Reply #1 on: March 23, 2021, 08:11:13 PM »
Hi.
All the actions Are started directly behind each other even when they are not yet finished (like a wait)

2 ways you can do is 1 separate in multipe states, have the last 3 actions from the fade out state into a separate one

set the state as sequence :
Right click on a empty space of the action windows and you can select sequence.
(you can see a 'v' in the line between the states if its active).

This will make it wait for each action to finish before starting the next one.

stellarGameLove

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Get Position / Set Position doesn't work properly?
« Reply #2 on: March 24, 2021, 05:14:21 AM »
Thank you for your response.

Unfortunately, it still doesn't work. Tried both ways, it's still the same.

My rigid body character enters the trigger.
Trigger activates the state 2: FADE OUT > GET POSITION > WAIT
wait proceeds to state 3: SET POSITION > FADE IN
fade in proceeds to state 1: Trigger (i want trigger to stay active even when i am in interior).

I still get the same results. My rigid body character won't stay on that position (it returns to the original position), and if i set to every frame, it will teleport to the interior spawn point, but i am unable to move.

I personally think it has something to do with First Person controller rigidbody. I also tried with get/set property, still getting the same results.

Again, thanks for the response.

stellarGameLove

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Get Position / Set Position doesn't work properly?
« Reply #3 on: March 24, 2021, 07:20:39 AM »
Ok, i found the solution.

For everybody who has the same issue, you need to enable Auto Sync Transform in Physics settings. It works now.

Again, thanks for the help.