playMaker

Author Topic: Moving an object accurately one unit at any speed[SOLVED]  (Read 6279 times)

MattyWS

  • Junior Playmaker
  • **
  • Posts: 90
Re: Moving an object accurately one unit at any speed
« Reply #15 on: February 21, 2018, 02:45:26 PM »
Sorry I didn't even notice the layer thing, flawless victory for you! It works perfectly! I'd upload a video but it's nothing fun to look at. Thank you very much!

MattyWS

  • Junior Playmaker
  • **
  • Posts: 90
Re: Moving an object accurately one unit at any speed
« Reply #16 on: February 21, 2018, 03:31:41 PM »
Actually just for the hell of it, here's what you helped me create. :)

« Last Edit: February 23, 2018, 02:51:27 AM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Moving an object accurately one unit at any speed[SOLVED]
« Reply #17 on: February 23, 2018, 02:54:52 AM »
OOoooo!

Works pretty good :D

I edited the link so it shows in the post :D

Btw for recording you can use Obs studio, its free to use and easier than using a cam  :)

MattyWS

  • Junior Playmaker
  • **
  • Posts: 90
Re: Moving an object accurately one unit at any speed[SOLVED]
« Reply #18 on: February 23, 2018, 06:01:24 AM »
Thanks! The recording was really spur of the moment, I'll do some proper recordings when I have something nice to look at. :)

I've already made pretty decent progress but still far to go before it's releasable. ^^ I'll be publishing to the windows store only though, as it seems to be the easiest platform and this is more of a fun recreation of my old game.

Anyway lesson learned, animating movement (in my case using DOTween) will be more accurate than movement via translate or physics. DOTween was also extremely fast compared to iTween, I am impressed! I ended up buying DOTween Pro and the playmaker actions on the store.

MattyWS

  • Junior Playmaker
  • **
  • Posts: 90
Re: Moving an object accurately one unit at any speed[SOLVED]
« Reply #19 on: February 26, 2018, 11:58:53 AM »
Oh I picked up another bug randomly. :(

Now my ball will occasionally stop when it comes across a collision. It will transition to the next state but in the state where it checks what it's colliding with (be it a wall or a bar etc) it now stays in that state. I check the balls position and it is perfectly where it should be when it stops, so it's not misaligned.

I think it may have something to do with a new component attached to the ball "Play Maker Trigger Stay 2D (Script), it's now permanently on the ball prefab but I've not noticed it before? It's the only change I've seen that could be causing it, it's been wracking my brain all day. I assume it's not supposed to stay on there?

MattyWS

  • Junior Playmaker
  • **
  • Posts: 90
Re: Moving an object accurately one unit at any speed[SOLVED]
« Reply #20 on: February 26, 2018, 05:26:18 PM »
I recorded the ball stopping for no reason. It wasn't always doing this and it happens very randomly and not always in the same place. Sometimes it might stop at the walls or one of the bars



EDIT: I think I may have solved this simply by setting the rigidbody 2D of the ball to never sleep. ..... Spent the better part of today trying to solve this ridiculous issue that only just popped up now and I have no real idea if it did resolve or not, because reproducing is random. :D Fun times..
« Last Edit: February 26, 2018, 06:14:30 PM by MattyWS »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Moving an object accurately one unit at any speed[SOLVED]
« Reply #21 on: February 27, 2018, 12:57:14 AM »
Hi,
for good testing i usually make a build or at least hide/close the Playmaker window as this tends to lag sometimes and get strange behavior in the game.