playMaker

Author Topic: checking objects position?  (Read 1293 times)

Buster

  • Playmaker Newbie
  • *
  • Posts: 6
checking objects position?
« on: October 03, 2022, 12:49:32 AM »
I want the object to do like a jump effect. Ive tried both add force and set velocity which both work fine cept it allows object to keep multiplying the jump mid air. I want to only be able to jump below a certain Y value. I tried get position action followed by a compare float, but the Y position doesnt change after it was checked (tried get velocity too with same results..value doesnt recheck.)

I considered just doing a wait action and trying to calculate the time of the jump but the problem is latter I want to turn the force/velocity into a variable which will be changed due to certain events. I even tried a transition for greater than re-looping to start of the state.

What obvious answer am I missing?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: checking objects position?
« Reply #1 on: October 03, 2022, 12:23:23 PM »
Hi.
There is a 'Every Frame' check box.
This will make it update every frame

Buster

  • Playmaker Newbie
  • *
  • Posts: 6
Re: checking objects position?
« Reply #2 on: October 03, 2022, 01:34:52 PM »
Hi.
There is a 'Every Frame' check box.
This will make it update every frame

I thought that was answer too but when tried I got this error. So Im doing something wrong.

I should add that if I wait for the jump to complete before jump again it does fine. Its if I "double jump" (which is what I want to prevent) the looped transition turn yellow and it instantly locks up with that error.
« Last Edit: October 03, 2022, 01:42:43 PM by Buster »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: checking objects position?
« Reply #3 on: October 04, 2022, 01:43:25 AM »
Hi.
Yea the 'recheck' you should remove as it will do infinite loop it already checks every frame if enabled.

Also you might want to use some raycasts/boxcast instead to check for floor