Physics stuff
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Physics stuff
OK, so I want to have a platform that isn't affected by gravity or other objects that can be rotated and can push a ball around. I tried using a static object for the platform and using body:setAngle, but then the ball can get stuck in or go through the platform and the platform doesn't apply any force to the ball. How do you think I should do this?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Physics stuff
I think you should use Joints for that. Not sure how. (I don't have that much experience with Joints.)
Help us help you: attach a .love.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Physics stuff
I'd really like to help you, but you need to be more specific. If the platform isn't supposed to affect other objects, how is it going to affect a ball, which is another object?Tesselode wrote:A platform that isn't affected by gravity or other objects that can be rotated and can push a ball around
You mention that you want to change the angle of the platform. Do you need it to spin around a corner, or around its center of mass? What's its shape? Where is it in relation to the ground?
If you don't feel like answering all this, a simple image (i.e. ms paint) would suffice.
But yeah, almost certainly you will want to use a revoluteJoint.
When I write def I mean function.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Physics stuff
Now that I think of it, LovelyBigPlanet has “floating platforms”, which have a very high level of friction, but are not static. Probably not what you're looking for, though.
Help us help you: attach a .love.
- rhezalouis
- Party member
- Posts: 100
- Joined: Mon Dec 07, 2009 10:27 am
- Location: Indonesia
- Contact:
[Response]CMIIW
Something like this?
- Attachments
-
- rotatingPlatform.love
- LOVE0.6.2
- (662 Bytes) Downloaded 73 times
Aargh, I am wasting my posts! My citizenshiiiip...
Re: Physics stuff
Pretty much, except the ball shouldn't be able to push the platform. I think that today I'll post what I had that was sort of working.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Physics stuff
Then you need to make the platform super heavy.Tesselode wrote:except the ball shouldn't be able to push the platform.
Help us help you: attach a .love.
Re: Physics stuff
Well, that would just lessen the problem, not fix it.Robin wrote:Then you need to make the platform super heavy.Tesselode wrote:except the ball shouldn't be able to push the platform.
Is there a way to do this with a static body for the platform?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Physics stuff
Well, there's the rub: if it is static, it can't rotate.Tesselode wrote:Is there a way to do this with a static body for the platform?
Making it very heavy means that no other object has any noticeable influence on it. Isn't that good enough?
Help us help you: attach a .love.
Who is online
Users browsing this forum: No registered users and 85 guests