Dig this:
http://kudomiku.com/dump/envy.love
Are my balls too manly for it? Oh and when you click on an entity and hold it down you're supposed to be able to move it with the mouse but that fails too, it goes in a wierd direction as if setPosition wants a local position (WTF).
This rectangle doesn't want to touch my balls :(
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: This rectangle doesn't want to touch my balls :(
I think maybe the ground shape was garbage collected. It works now. As for controlling stuff with the mouse ... I didn't find the offending piece of code fast enough. I know body:setPosition() works fine, that's how stuff is reset in lovalanche.love.
Tip! (for everyone). When you're done adding shapes to a body, call body:setMassFromShapes().
Tip! (for everyone). When you're done adding shapes to a body, call body:setMassFromShapes().
- Attachments
-
- envy2.love
- (6.59 KiB) Downloaded 263 times
Re: This rectangle doesn't want to touch my balls :(
Are the x and y positions of shapes the same as x and y positions of the body?
Or are they local the body and where would 0 be by default on a new body?
Or are they local the body and where would 0 be by default on a new body?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: This rectangle doesn't want to touch my balls :(
Found your second problem, setVelocity (in entity) is accidentily declared as setPosition too, so it thinks it has to set the velocity instead of the position. I'll upload 3.
- Attachments
-
- envy3.love
- (6.59 KiB) Downloaded 253 times
Re: This rectangle doesn't want to touch my balls :(
Thank you!
And my final problem, applyForce and applyImpulse to nothing
And I'd use setVelocity but that stops all current motion.
And my final problem, applyForce and applyImpulse to nothing
And I'd use setVelocity but that stops all current motion.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: This rectangle doesn't want to touch my balls :(
It might be something wrong with the calling, as that isn't included in the .love provided, however I haven't worked with the physics engine myself. You said you could also use setVelocity but it doesnt add to the old velocity, what about a combination with getVelocity()?
Re: This rectangle doesn't want to touch my balls :(
I'm dumb.
Thanks!
Thanks!
Re: This rectangle doesn't want to touch my balls :(
I just wanted to add that the title of this thread made me LOL for reals.
Now posting IN STEREO (where available)
Who is online
Users browsing this forum: No registered users and 8 guests