Collision&Gravity Problem - Tshirtbooth

ShpintShpint Member Posts: 404
edited November -1 in Working with GS (Mac)
1) I have a round actor with his arms and legs sticking out. I only want his body to collide not his arms and legs. I remember reading your post about distance from midpoint or something.

2) I also wants him to roll when he moves on the platform. This is what happens, when I press keyboard "right" he moves right "left" he moves left, but he doesn't roll; he only "move". Rotation is enable. Does this has anything to do with friction? If not how can I accomplish this?

3) How can I increase the speed of him falling down? On the scene gravity attribute, I put in 0 for X and 90 for Y. All movable objects seem to be falling, but at a very slow speed. I also try using accelerate down, but when he touches the ground, I cant move him left or right.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    1) There is a trick that may work for you that does not use trig (which can hurt FPS a bit). If you have a rectangular image (not square) and set the collision shape to circle, GS will make the collision zone a perfect circle. This circular collision zone will be centered in the center of your actor and will have a diameter equal to the shorter side of your rectangle. So if you can make your image a rectangle and have the arms and legs sticking out the sides or the top and bottom they will not collide and you do not have to use magnitude.

    2) For platform rolling I use a combination of rotate and accelerate. You must also play with the friction of the platform and the rolling actor. With enough friction you could use just rotate and your actor will roll. I find that using both rotate and accelerate works pretty well, though.

    3) I NEVER use scene gravity anymore. Keep it at zero and put am accelerate 270 to scene in any actor that you want to fall. You can even create a game attribute (integer) and call it game.gravitySpeed. Use this for the accelerate 270 speed and set it to whatever you want. then if you decide that you need more gravity you will only have to change this value once and it will be applied to all your falling actors (just a time saving tip).
  • ShpintShpint Member Posts: 404
    Thank You!!
    I found out the solution for 2,3 , but for 1, my actor is a bug.
    He has 6 legs, a tail, and 2 antenna (What ever that part is called)
    Anyone?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    There is no way to do this if you need actual physics collisions (i.e. realistic bouncing). If you simple need to know if the body of your bug is overlapping, then that can be done easily using magnitude. If you don't physics reply to this and I'll walk you through the magnitude function. If you need physics you are pretty much SOL.
Sign In or Register to comment.