Posted: 12th Sep 2011 22:20
Hi all! I am messing around with physics sprites, but I'm abit stuck on how to make rigid object that physics sprites will hit and interact with, say a 45 degree slope that will not move, but a physics enabled egg will tumble down it... any ideas?
Posted: 12th Sep 2011 22:22
I believe you're looking for the 'Rigid' (Or Static, in this case) state in the following command. SetSpritePhysicsOn(SpriteID, PhysicsMode)

EDIT: Fixed the URL.. I forgot the closing tag.
Posted: 12th Sep 2011 22:23
You can make a "static" type physics object. If you make a box shape object, you can rotate it 45 degrees and it will act as a slope. Or you can make a polygon shaped like a slope.


Lol, Silvester, beat me by a minute!

Yah, like he said. All physics objects are sprites, they can be static, dynamic, or kinematic.

see here for the difference
Posted: 12th Sep 2011 22:42
oh, thanks! YES! Now it works I need to pay deeper attention to the docs... I am reading help files, and at every 4th command, I just have to go on and test it, then back to the help files, ahhh the pain of learning a new language... I am making a physics based game about a chicken flying around dropping eggs... haha don't ask...

I found out that applying rotation to sprites with physics enabled, create the most bizarre effects, and the walls were jumping around and climbing eachothers like they were under a magic spell, now I got em nailed down haha.
Posted: 12th Sep 2011 23:08
A pic of the prototype test... I'm using a few eggs in the real game LOL



Hmm... How about a level editor... I think I need to make a level editor for this game.
Posted: 13th Sep 2011 0:03
One thing to watch out for when you set up your sprites for physics...

The set rotation command causes a recalculation of the sprite mass, so if you use the set mass command, use it after the set rotation on/off command.

PS - LOL, that's a LOT of eggs!
Posted: 13th Sep 2011 0:43
im makeing a level editor built in to my game for a motor bike game. ill be posting a new video soon.

http://forum.thegamecreators.com/?m=forum_view&t=189005&b=41