gravity without physics

Get help using Construct 2

Post » Wed Dec 05, 2012 1:25 pm

hello everyone.

i am making a game which requires a lot of objects using the physics behaviour only for the gravity and the set to immovable function. does anybody have any idea how to replicate this effect without eating away RAM. (i also need a way to turn the gravity off). to make it harder for you guys (sorry) i need a way to make it able to work in harmony with many objects, about 14 types.

thank you in advance
B
20
S
8
G
2
Posts: 122
Reputation: 3,202

Post » Wed Dec 05, 2012 2:26 pm

Platform Behavior
B
12
S
1
Posts: 46
Reputation: 1,853

Post » Wed Dec 05, 2012 2:47 pm

You can move the object's Y to object.y - 1 at every tick and check if there is a object there first?
B
37
S
11
G
6
Posts: 962
Reputation: 11,259

Post » Wed Dec 05, 2012 4:29 pm

thanks @rory and @TDark
B
20
S
8
G
2
Posts: 122
Reputation: 3,202

Post » Wed Dec 05, 2012 6:10 pm

You should create an variable called VectorY. Every tick, if it's not overlapping another object, set Y to self.Y + self.VectorY. Every tick, also add some amount*dt to vectorY.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Wed Dec 05, 2012 6:13 pm

sorry @squidster i am lost at the VectorY princniple you introduced to me.
these are dropping in my brain
B
20
S
8
G
2
Posts: 122
Reputation: 3,202

Post » Wed Dec 05, 2012 7:08 pm

i also need help on making these objects stack on top of each other
B
20
S
8
G
2
Posts: 122
Reputation: 3,202


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests