I am having problems getting a ball to move at a constant speed
my ball is not moving at constant speed. when it collides with the slider, it slows down speed. i have everything set to 0 except for restitution-1. i have set- when ball collides with slider, change attribute( self. motion.linear.velocity.x) to (self. motion.linear.velocity.x)(max.speed).
i have also tried- change attribute( self. motion.linear.velocity.x) to (max.speed).
or does it have to do with ball velocity? - random(0,360) is what i am using so as to get perfect bounce.
i have also tried- change attribute( self. motion.linear.velocity.x) to (max.speed).
or does it have to do with ball velocity? - random(0,360) is what i am using so as to get perfect bounce.
Comments
You could put a time:
Every 0.1 second,
Change attribute self.motion.linear.velocity.x to whatever
Try that.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
i tried but it did not work. instead made my game lag. but i seem to get result when i put change attribute (velocity x) to (velocity x )( max.speed) but occasionally ball goes super slow till it dies.maybe due to shape of slider
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Also, ya @gsrockz123, totally crap subject line. Try adding please next time.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Email- gamesaladapps@gmail.com
1) i changed paddle rule from mouse position to touch position.
2) i change ball bounciness from 2 to 1.
i am making an iphone game so i changed mouse position to touch position. to get perfect ball bounce off walls, i changed bounciness from 2 to 1. So now i have narrowed down the problem to these 2 and i am sure its with these as i have not changed anything else from template except i added many many other bricks and lose,win scenes
EDIT: I found that changing bounce to 1 in the template reduces speed by a margin but not as bad as my game. setting it back to 2 in the template does not reduce speed but the bounce off walls is bad.
using gs physics engine collide does not work at all btw
for future purpose, my solution- i changed density of paddle form 0 to 1000 and it worked like a charm!!!