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

Pages: [1]
1
Support / Re: Collisions with custom box colliders on non moving sprites
« on: August 15, 2013, 08:43:52 pm »
That was exactly what it needed! It now works precisely how it is supposed to. I read about the Kinematic Rigidbody, but didn't try it b/c I'm using triggers not collisions. However, I see now that it is necessary for any situation. Much appreciation for your help!

I don't suppose you could briefly explain why, or point me to some literature that explains why, all colliders should have a rigidbody attached? I would definitely like to increase my understanding!

Thank you very much!

EDIT: Nevermind! I easily found some links that explain the whole concept quite efficiently. I will include them here for anyone who may find value:

http://answers.unity3d.com/questions/40448/why-attach-a-kinematic-rigidbody-to-a-collider-tha.html

http://docs.unity3d.com/Documentation/ScriptReference/Collider.html

2
Support / Re: Collisions with custom box colliders on non moving sprites
« on: August 15, 2013, 05:35:26 pm »
Do you have a kinematic rigidbody attached to this?

I'm not 100% sure, but I don't think I do. I'll explain my setup and maybe you can point me in the right direction.

I have an enemy Sprite with Animator. I've manually put a Capsule Collider on the sprite so as to detect when the player strikes the enemy. I've also used the 2dtk Sprite Collection to create a box collider which covers the enemy's weapon in each frame of the enemy's attack. This box collider catches when the enemy strikes the player's collider. They are all setup as triggers, as I don't want to use actually collision physics in combat.

The problem I'm running into is when the player's capsule collider stands next to the enemy and the enemy's box collider is spawned on top of the player. Basically, the enemy is swinging and after a couple of swings, if the player doesn't move, the box collider will stop registering triggers.

I can make/send a video for further explanation if that would help?

Thanks a bunch!


3
Support / Re: Collisions with custom box colliders on non moving sprites
« on: August 15, 2013, 08:26:52 am »
Hello,

Did you have a chance to dig deeper into this issue yet? I'm running into the same problem with a custom box collider in a tk2dSprite with Animator. It will activate the trigger with the player's character controller a few times, then once the player stops moving, it will no longer register trigger events.

Thanks a bunch!

EDIT: This might have something to do with the destruction/recreation of the box collider happening on the collider it previously "triggered" with. I only suspect this, b/c sometimes I am able to cause the OnTriggerStay event to keep firing, however the OnTriggerEnter, never re-fires after a few times.  To recreate, create a sprite animtor with an overhand sword swing, with the sword being the box collider, then move a character controller well within the range of one frame that contains a box collider. It should register a few OnTriggerEnter's, then stop, sometimes continuing to register OnTriggerStay's.

4
Releases / Re: 2D Toolkit 2.0 final
« on: June 01, 2013, 04:48:57 am »
Awesome!!!

Not sure if it's something I did wrong or if it was intentionally left this way, but the tk2dTileMap_demo folder is empty after I imported the Unity Package?

Pages: [1]