How do I physics balance

Get help using Construct 2

Post » Fri Aug 26, 2016 10:09 pm

Hi all could do with some help. I am trying make a unicycle physics game where you have 2 buttons to move forward,back ( done that :) ) but i cant get the unicycle frame to balance. I have tried just using force to push and pull but if the top of the frame (seat/force point) gets to low the force pushes the whole thing. I then tried to place a point above the unicycle and used force to point but the problem with this was because the force is going up and makes the unicycle abit floaty any help on this would be great.
B
10
S
2
Posts: 7
Reputation: 705

Post » Fri Aug 26, 2016 10:20 pm

Its difficult to help without seeing the actual setup of your physic objects,
but it may helps to play arround with angular and linear dumping to make it easyer to balance the unicycle regardless of the setup.
B
68
S
28
G
7
Posts: 85
Reputation: 7,496

Post » Fri Aug 26, 2016 11:08 pm

B
10
S
2
Posts: 7
Reputation: 705

Post » Sat Aug 27, 2016 12:55 am

try applying force to the center of the wheel with a little offset on X like ...
force 50 towards (self.X-10,self.Y) at imgpoint 0 for it to go left
force 50 towards (self.X+10,self.Y) at imgpoint 0 for it to go right
...is that what you want?
B
68
S
28
G
7
Posts: 85
Reputation: 7,496

Post » Sat Aug 27, 2016 1:06 am

oh and if you just want the wheel to spin you can do
torque -1000 to move left
torque 1000 to move right
all the numbers depent on your physic settings of course.
If you work with torque you should play with the friction of your wheel
B
68
S
28
G
7
Posts: 85
Reputation: 7,496

Post » Sat Aug 27, 2016 9:40 am

The problem is I don't want the force on the frame to affect the wheel. I have the wheel moving as you said with the torque that's working fine it's just trying to get the frame to pivot around the wheel smoothly without the force affecting what the wheel is doing (ie pushing wheel forward or up with the force on the frame) so you have 2 aspects to my game move (2 buttons) and balance the frame (2 buttons or slide bar) :/ but I do appreciate the help EpicPixel
B
10
S
2
Posts: 7
Reputation: 705

Post » Sun Aug 28, 2016 4:02 am

Hmm, ok.. so the wheel should spin and move the unicycle or no?
The frame should only change its rotation, but not affect the wheel?
If thats the case then maybe dont use the physic behavior on the frame but pin it.
if you want physic on the frame hmmm idk ... maybe set the frames density to nearly 0 or make the wheel super havy so it doesnt get affected so much?!?!
The thing is as long as both are physic objects and they are attached to each other they will always interact with each other... that's the point of the physics behavior :/
Maybe you could pin a sprite with physic behavior to the wheel, set immovable to yes, make it invisible and attach the frame with an revolute joint to that invisible sprite?!?!
B
68
S
28
G
7
Posts: 85
Reputation: 7,496

Post » Mon Aug 29, 2016 2:37 pm

This a direction you can continue from ?

https://drive.google.com/open?id=0B1SSu ... VAtTW55YkE
B
33
S
18
G
27
Posts: 2,447
Reputation: 20,358


Return to How do I....?

Who is online

Users browsing this forum: David181 and 17 guests