Physics/animation issue?

Bugs will be moved here once resolved.

Post » Sun Dec 04, 2016 4:13 am

Problem Description
Physics force for movement only is applied once every animation finish or stop

Attach a Capx
https://drive.google.com/open?id=0B4n8l_KPrCyQUkRIMVJ1T3RiSGs

Description of Capx
simple animation the runs continuous try using WASD to move it around and it will skip

Steps to Reproduce Bug
  • import animation
  • apply physics and make animation repeat when finished
  • apply physics force to angle at keyboard (wasd) or position to mouse

Observed Result
sprite will skip once every animation finished or stop during animation play it pauses

Expected Result
smooth semi Newtonian physics for space ship like movement(inertia etc)

Affected Browsers
  • Chrome: (YES
  • FireFox: N/A
  • Internet Explorer: N/A
  • Edge: Yes

Operating System and Service Pack
Windows 10 all latest updates

Construct 2 Version ID
R239 64bit
B
18
S
7
Posts: 13
Reputation: 1,235

Post » Sun Dec 04, 2016 12:00 pm

yes its an interesting one....not quite sure myself.. :geek:

nice gimble 8-)

I have tried a few things but the problem remains..... ..maybe some one else has an idea..?

will have to look at it again tomorrow..for now I am stumped

:shock:
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Sun Dec 18, 2016 9:44 am

anybody else encounter this issue? dosn't anybody know a fix? I cant continue on this game till its fixed:(
B
18
S
7
Posts: 13
Reputation: 1,235

Post » Sun Dec 18, 2016 12:12 pm

nmf004 wrote:anybody else encounter this issue? doesn't anybody know a fix? I cant continue on this game till its fixed:(

Yeah I did, all I can give you are 2 workarounds but no real fix for this issue.

1. Use a separate "collider" sprite and set game character position accordingly
Basically an additional sprite which only has a single frame. You will have to set the collisions and add the physics behavior to this sprite, you basically base all your game mechanics on this "collider" sprite, while your actual animated game character is used for visual feedback. (I'm using this method for my physics based game mechanics.)

2. Try to use the 3rd party plugin "Chipmunk Physics" (LINK)
This behavior comes with a lot of advantages that you can read by clicking on the link above.
I'm not sure if that works well with animations but I think it should.
ImageImageImageImage
B
56
S
21
G
77
Posts: 637
Reputation: 43,963

Post » Wed Dec 21, 2016 2:42 pm

Closing as won't fix - you should not use animated Physics objects. The Physics behavior treats a change of frame as destroying the physics body and teleporting a new one in its place (to take in to account changing collision poly, size, origin etc). Therefore animating objects keeps destroying the physics body you're applying force to.

The workaround is to use a non-animated invisible physics body and then place the animating spite on top.

I think that's not mentioned in the documentation, so I should probably add that somewhere...
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,464


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest