Sensors in the Physics engine

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
lejeunerenard
Prole
Posts: 11
Joined: Mon Apr 13, 2009 7:33 pm
Contact:

Sensors in the Physics engine

Post by lejeunerenard »

What I need is a physics object that contacts other object but doesnt actually effect their motion. For example I want to make a retangle that triggers a collision even with the player and as a result the player will then move slower or stay afloat. I figure this is what sensor is for, but when I tried to use sensor it still acted like a solid object. I will try to get an example up soon but I do not have time right now. Thanks for any help.

--peace
Le Jeune Renard
User avatar
Neptar
Prole
Posts: 20
Joined: Mon Feb 16, 2009 3:24 am
Location: England

Re: Sensors in the Physics engine

Post by Neptar »

I think it would be easier to leave the physics engine out of this. And just use a simple procedure for these sensors. It has been mentioned before on these forums about per pixel collision detection and such. But a lot of the time it is pointless and simpler methods can be used.

It depends on the shape of the object that will be hitting these sensors. But I would steer clear of the physics engine for this task, and save your resources and do it as simple as you can get away with. I just use the most basic form of box collisions in my game, and design my sprites so that you really don't notice that much.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Sensors in the Physics engine

Post by rude »

lejeunerenard wrote:[...] it still acted like a solid object.
I better take a closer look at that (when I get the time).
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests