playMaker

Author Topic: Get and Set Position issue on wall [SOLVED]  (Read 4878 times)

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Get and Set Position issue on wall [SOLVED]
« on: June 20, 2014, 09:20:47 AM »
Hi,

I am simply getting and setting the position of my player when they enter a trigger. I have attached my setup. This works smoothly when i enter the trigger on example named '1'. im ignoring Y axis as i dont need it.

The problem is when i enter on example '2'. It moves the position of the player but does a jerk motion? Could this be a collider issue or just because im faced 90 degrees in world space?

btw my player can climb walls. any advice would be great

thanks

nick
« Last Edit: January 25, 2015, 06:40:41 PM by coxy17 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get and Set Position issue
« Reply #1 on: June 20, 2014, 09:23:11 AM »
Set Position should be in World Space.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue
« Reply #2 on: June 20, 2014, 09:34:59 AM »
hi

i have tried that but it still behaves exactly the same?

confused :/

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get and Set Position issue
« Reply #3 on: June 20, 2014, 10:01:37 AM »
Hmm... I suppose Late Update could cause some sort of stutter, but it would be in both cases.

Can you post an example scene where it happens?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue
« Reply #4 on: June 21, 2014, 11:49:51 AM »
I'll save off an example, will do later as I'm not at my machine.

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue
« Reply #5 on: June 23, 2014, 05:54:56 AM »
I have attached a link to a test scene. There are two triggers (gold). The first one is example A and once you have entered the area you can click rotate (left or right key) and this triggers a Get/Set position. To walk just hold forward key.

To climb the wall and go to example B just walk towards the wall. This is the one which doesnt behave correctly.

https://www.dropbox.com/s/sja5ocogc7vpc56/TriggerGetSetPosition.unitypackage

thanks

Nick

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get and Set Position issue
« Reply #6 on: June 24, 2014, 10:16:18 AM »
It doesn't seem to work, theres a couple of errors on the Int Compare. The Down trigger has the int stuff, but the Up trigger doesn't. What is the Int stuff for? I'm guessing you're trying to see if the player is not in the center of the pathway and then zero out the position?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue
« Reply #7 on: June 24, 2014, 10:35:06 AM »
ignore the other stuff like int compare. Its just my experiment project. Its pretty much what you said. to check the players aligned and zero it out. The trigger area its supposed to align it to the trigger. which it does, however it jumps in example b

does my example load? or do you want me to send you another file?

btw. you can walk up the wall to example b but cannot walk back down to example A as ive not set this up yet

« Last Edit: June 24, 2014, 10:39:29 AM by coxy17 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get and Set Position issue
« Reply #8 on: June 24, 2014, 10:58:01 AM »
Nothing happens, because nothing fires the Align event.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue
« Reply #9 on: June 25, 2014, 03:25:10 AM »
Hi,

sorry just opened and i can see the errors, my bad

ive updated it now, the one directly in front of you (example A) works fine, the one on the wall only seems to align on one axis now? strange... i just need the player to align exactly center of the trigger on both X and Z. Its a replica of example A? so not sure whats going on?

hope you can help in any way :)

btw, the rotation of the character triggers the alignment.

https://www.dropbox.com/s/sja5ocogc7vpc56/TriggerGetSetPosition.unitypackage

thanks

Nick
« Last Edit: June 25, 2014, 03:27:30 AM by coxy17 »

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Re: Get and Set Position issue
« Reply #10 on: June 25, 2014, 06:36:43 AM »
Yea, I actually have a similar issue using Get / Set Position but with a camera - the player has a trail renderer and I notice that using that method to make the camera follow it, there's a noticeable jerk to the trail motion.
I wonder if the addition of a Fixed Update to the action would do the trick?

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue
« Reply #11 on: June 26, 2014, 04:23:44 AM »
Hi MajorIdea

I think you might be right. How can i change this from OnUpdate to OnFixedUpdate to prove this?

Nick

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Re: Get and Set Position issue
« Reply #12 on: June 26, 2014, 07:55:32 PM »
I think you might have to create an alternative version of this action? I tried editing one once but I only got an error out of it. It's something I've been meaning to learn :\

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue
« Reply #13 on: June 27, 2014, 02:30:31 AM »
Hey

Yes I had the same problem. I'm still learning. I'm going to try and do it, not sure how it will go :/


coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Get and Set Position issue on wall
« Reply #14 on: January 19, 2015, 03:44:43 AM »
Hi, not had any luck with this, is anyone able to create an alternative version of this action? thanks