How do I use another sprite as a collider for movement?

Get help using Construct 2

Post » Tue Aug 18, 2015 10:13 pm

Hello

I am making a top-down adventure game with 2 sprites pinned to the player:

- player: Main sprite, 8 directions, rotating to detect which animation to play and control actions
- anim: No collision, must not rotate, only displays visual according to current state
- feet: Feet collision, must not rotate to act like a rectangle collision

Now, I don't know how I can get the player to use feet collision polygon to affect's its movements (stop at solids, activate pressure plates, etc)

Right now, I'm using player's collision, but since it rotates, it cannot be used properly for precise feet collision.

Here's a screenshot, I'd like to use the Feet collision to be used when moving the Player

Image

Thanks!
Simulation Level Designer
B
12
S
2
Posts: 13
Reputation: 1,082

Post » Wed Aug 19, 2015 7:13 am

I'm using the shadow as 8-Movement behaviour and collision and works great ;) , thehn pin the player or every tick in the X/Y shadow.

For the shadow draw the colision desired and ready!
B
26
S
10
G
3
Posts: 585
Reputation: 4,597

Post » Wed Aug 19, 2015 2:10 pm

matriax wrote:I'm using the shadow as 8-Movement behaviour and collision and works great ;) , thehn pin the player or every tick in the X/Y shadow.

For the shadow draw the colision desired and ready!


Thanks for your reply!

That'd work for the collision, but the problem is I would not be able to use the shadow's "8direction" to determine the anime to use as I cannot use "Set Angle" (I like how the he continues to walk in the correct direction until .

My guess was that a workaround would take longer than finding a way to keep using's 8direction's angle to affect the animation, but I guess I'll have to rethink the whole system :S.
Simulation Level Designer
B
12
S
2
Posts: 13
Reputation: 1,082

Post » Wed Aug 19, 2015 4:22 pm

wouldn't you be able to work with: Sprite.8Direction.MovingAngle ?

Another way would ofcourse be setting the animation based on the player input..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Aug 19, 2015 5:28 pm

Yeah, I guess I'll have to take it directly from the inputs, thanks for the input!
Simulation Level Designer
B
12
S
2
Posts: 13
Reputation: 1,082


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests