Problems with applyforce *possible bug

I can’t for the life of me work out what’s wrong and therefore think this could be a bug.

I’m using the applyforce for multiple characters within my game. For some reason with my third character, the applyforce is not working as expected.

I’ve been playing around and have narrowed it down a little.

char3:applyForce( 0, 0 , char3.x, char3.y )

Using the above code is moving my character, even though I’ve set the x and y force to 0.

I’ve done the same test with my two previous game characters and they don’t move, as expected.

Anyone got any clues as to why this might be? [import]uid: 112669 topic_id: 35267 reply_id: 335267[/import]

I think more code would help.

Currently, the only thing I can think of is that you’ve got some other force working on the object. Have you tried deleting the entire applyForce line? Then you could see whether something was acting or not on it.

C [import]uid: 147322 topic_id: 35267 reply_id: 140207[/import]

Thanks for getting back to me Caleb,

The only other force I’m using is linearDamping to slow the character down once the force has been applied.

I’ve just tried taking this out and it does not make a difference.

Code wise for this section is pretty simple which is why I’m stumped.

Upon a touch event:

function GameEngine:state3_shot_in_play3( )

local char3 = self._character3

char3:applyForce( 0, 0 , char3.x, char3.y )

end

I’m gonna keep testing to try and find if there is any other force acting upon it but what get’s me is this character is virtually identical to character 2, which works like a charm. [import]uid: 112669 topic_id: 35267 reply_id: 140210[/import]

Ok, I’ll have to hold my hands up as I think it is a coding error.

Somehow the Characters initiating a transition somewhere.

Looking for other forces I stumbled across what it could be and am confident it’s not a bug at all.

Sometimes you just need another head to bounce ideas off.

Many thanks

[import]uid: 112669 topic_id: 35267 reply_id: 140212[/import]

I think more code would help.

Currently, the only thing I can think of is that you’ve got some other force working on the object. Have you tried deleting the entire applyForce line? Then you could see whether something was acting or not on it.

C [import]uid: 147322 topic_id: 35267 reply_id: 140207[/import]

Thanks for getting back to me Caleb,

The only other force I’m using is linearDamping to slow the character down once the force has been applied.

I’ve just tried taking this out and it does not make a difference.

Code wise for this section is pretty simple which is why I’m stumped.

Upon a touch event:

function GameEngine:state3_shot_in_play3( )

local char3 = self._character3

char3:applyForce( 0, 0 , char3.x, char3.y )

end

I’m gonna keep testing to try and find if there is any other force acting upon it but what get’s me is this character is virtually identical to character 2, which works like a charm. [import]uid: 112669 topic_id: 35267 reply_id: 140210[/import]

Ok, I’ll have to hold my hands up as I think it is a coding error.

Somehow the Characters initiating a transition somewhere.

Looking for other forces I stumbled across what it could be and am confident it’s not a bug at all.

Sometimes you just need another head to bounce ideas off.

Many thanks

[import]uid: 112669 topic_id: 35267 reply_id: 140212[/import]