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 - EvilDeathCrab

Pages: [1]
1
Support / Re: Problem with colliders, sprites, and physics.
« on: July 11, 2013, 07:28:00 am »
Sorry I didn't get back in a timely fashion, but this totally did the trick. I feel a little silly, because this seems like an obvious solution that I should have known.

This may be slightly off-topic, but do you know of any good tutorials (2d or otherwise) I could look into for this sort of stuff? I've been busy prototyping and I keep running into brick walls and posting here.

Just picking your brain if there are any good resources you would recommend, especially when dealing with sprite stuff. Thanks!

2
Support / Problem with colliders, sprites, and physics.
« on: June 27, 2013, 07:06:11 am »
I'm working on a game prototype where I am trying to create three animated sprites: the player, the enemy and a weapon (an animated sprite that is the child of the player). The enemy is a gameobject of sprites with rigidbodies that will "explode" out of place (ideally using physics) when I kill the enemy.

Right now I am currently having a bear of a time getting all of that to work. My current setup is:

The weapon is an animated sprite that has "create collider" checked. Additionally the sprites making up the sword swing have trimmed box colliders. However whenever the animation plays and the sword swings it is not triggering any OnCollision* or OnTrigger* events.

My Player is a Unity standard Character Controller, the animated sprite is set to not create a collider. If I make my enemy a trigger then my character controller will fire events, but the sword animation will not.

I got frustrated and started arbitrarily adding physics (great debugging, I know) and I was able to get my sword swing to register collision when I:
* Made my capsule regular collision.
* Made my 3 enemy "pieces" all have collision.

When I do this the collision all sort of slams together and my enemy goes flying, but when it lands I can "attack" it with my sword swing and the collision registers. However, the invisible capsule collision of the initial positioning is lingering.

I'm probably rambling a bit too much and showing off how little I know about colliders and Unity, but I'm not sure what I'm doing wrong. Any advice would be appreciated!

3
Support / Re: Multiple sprites in a single frame??
« on: June 20, 2013, 06:19:37 am »
In a similar vein:
Is there a way to stack multiple sprites into a single prefab/gameobject? If I wanted to make a character that's made of a number of "parts" but each part is a single sprite, is there a good way to create a natural grouping of sprites? For example, in the OP's picture above let's break it into 4 pieces: head, arms, body, legs. I'm wondering if there's a way for me to take those sprites and link them into a single unit that I can use elsewhere instead of having to copy/instantiate those 4 pieces every time. I think using that method you could create code that would swap out the sprites to create your "animation."

I tried adding multiple Sprite components to a single object, but that didn't have my intended effect. Is this possible to do?

Sorry if this isn't inline with your topic, OP. I think they're similar enough problems that I didn't want to split it off into a redundant thread.

4
Support / Error when updating to 1.92 +1 patch
« on: April 18, 2013, 05:20:01 am »
Hello,
  I am just getting back into my project after a long hiatus and the first thing I did was update Unity and 2D Toolkit. However, after importing the new files and rerunning the "Setup for JavaScript" I am now getting the following 2 errors:

Code: [Select]
Assets/TK2DROOT/tk2d_demo/tk2dDemoRuntimeSpriteController.cs(41,34): error CS0246: The type or namespace name `tk2dSpriteCollectionSize' could not be found. Are you missing a using directive or an assembly reference?
Assets/TK2DROOT/tk2d_demo/tk2dDemoRuntimeSpriteController.cs(73,44): error CS0246: The type or namespace name `tk2dSpriteCollectionSize' could not be found. Are you missing a using directive or an assembly reference?

Any ideas on what I'm doing wrong? It's weird because the tk2dSpriteCollectionSize is referenced in the same file and it appeared to be in the same class.

Thanks for your time!

5
Support / Re: Struggling with character movement/physics.
« on: June 18, 2012, 05:29:30 am »
Hi!

Thanks for the prompt response. That definitely did the trick. I just kicked everything up to ortho 10 and things worked just fine. I guess the physics engine doesn't like dealing with very small numbers.

The More You Know?

6
Support / Struggling with character movement/physics.
« on: June 17, 2012, 09:34:42 am »
To get started, I'm fairly new to 2DTK and Unity, but I do have some scripting background.

I'm currently trying to make a test project where I have a sprite with a CharacterController object added to it (to take advantage of the normal physics engine without having to write my own). I'm currently running into a problem where whenever I use Move or SimpleMove (any sort of movement, really), my sprite will fly high into the sky (along the Y axis, the longer I hold down the movement key the larger the Y value becomes).

I'm not entirely sure what I'm missing here. Do sprites on a small scale (I'm using the Orthographic camera size of 1 and my sprites/test room is scaled accordingly) not play well with Unity physics? Am I missing some property somewhere that makes character controllers naturally attempt to move themselves to a higher Y value or is this a known limitation? Is there a workaround?

Pages: [1]