Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - scottstephan

Pages: [1]
1
Support / Best way to find out what tile is "next to" an object?
« on: May 30, 2013, 11:10:30 pm »
I'm working on a turn-based game in which players can't pass certain environmental objects- rocks, water etc. Because the game is turn based, they get a set of availabe movement directions at the start of their turn. The way I did this back in ye olden Actionscript days was to have an array of tile and then check around the player to see if any of the directions were impassable.

2DToolkit doesn't have an array of tiles (I don't think!), so what're my best options and practices for checking for impassable directions around the player? My current idea is to have 4 small, sub objects around the player sprite, each one tile north, south east and west. Check for collisions and report back.

Is there a smarter way with the tools available in 2DTK?

2
Support / Re: Can't seem to get collisions to work!
« on: November 06, 2012, 04:25:31 am »
Is there a recommended controller for 2D work? That's where I seem to be, ahem, hitting the wall.

3
Support / Re: Can't seem to get collisions to work!
« on: November 05, 2012, 03:25:12 am »
Also, this solution only seems to block objects from along the topmost edge- In many cases I can still enter from the side. I have no idea what's going wrong and I've been trying dozens of permutations for hours. I feel like I have to be overlooking something very, very basic. Clues?

4
Support / Re: Can't seem to get collisions to work!
« on: November 05, 2012, 03:00:42 am »
So, I've been mucking with this for a few hours and here what I've found: Assigning the colliders from the sprite collection seems to generate colliders with low Z-depths. Only by manually assigning a box collider component and then increasing the Z-Depth (From something like 0.2 to 15) was I able to get my objects to register a collision.

However, I can't believe I'm the only person having this issue. YouTube tutorials make no mention of it and if you assign colliders automatically from the sprite collection, you don't have the option of adjusting Z-Depth, making me think that it must be something else.

As a side note: Even now that I can collide objects, colliding seems to "bounce" the rigidbody object (The player). This seems like a Unity concern, but can anyone shed some light on it?

5
Support / Can't seem to get collisions to work!
« on: November 05, 2012, 01:41:43 am »
Hola! 2DTK newbie here, so apologies if this is a goofy question. Here's my issue: I can't seem to get anything to collide!

I have a player sprite with a box collider (Set from the sprite collection as "box trimmed) and a water sprite/tile (Set as "box trimmed" from the collection) that I'd like to collide, essentially preventing the sprite from moving past it. However, the player sprite seems to just pass over/through the tile sprite. It's almost as if they're on different layers.

If I add a rigidbody to the player object, lock its rotation and Z-Pos and add gravity, it'll collide with the top of the water sprite/tile just fine, but seemingly not the sides.

What's my issue here? I can't seem to get 2 2D sprites, locked on the same Z, to collide. I feel like I must have weird misunderstanding of how collisions in 2DTK work, but can't seem to find anything in the docs that indicate this.

Pages: [1]