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.


Topics - EvilDeathCrab

Pages: [1]
1
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!

2
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!

3
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]