I am having a bit of trouble setting up custom collision object responses, and hoping someone can spot my mistake. All the videos I’ve watched suggest I understand how it should be setup, and yet for some reason it isn’t working.
I have created object types “Player” and “EnemyBlast”, and I am wanting a hit event to generate when ever the two contact one another. So, an “EnemyBlast” should Block on a “Player” object, and a “Player” object should Block on an “EnemyBlast”. At least I think so.
The following two images are the setup for my enemy blast, with a capsule collision at it’s root (called BlastCollision). The capsule simulates physics and its object type is set to “EnemyBlast”, and is set to block on the objects of type “Player”.
Next, the Player to get hit by an enemy blast has a static mesh at it’s root (called SM_Triangle), which also simulates physics. As shown in the two images below, the root mesh is set to object type “Player”, and is set to block objects of type “EnemyBlast”.
Can anyone see why the original “BlastCollision” capsule would not generate a hit event when colliding with the mesh of my player of object type “Player”? I expect I setup the object responses correctly, but clearly something is off. Thanks!
P.S. for some reason, if I set my player mesh to Block objects of type “Player” (which is itself) then a hit event is generated when it collides with the BlastCollision capsule (which I don’t think is correct).
You capsule having simulate physics is not necessary. It may actually be falling when doing so especially if you have gravity or other phisics in place.
Unless required, disable Physics, set up your blocking accordingly.
If the capsule is not your root, you may even not notice that the caspule fell somewhere and is not even where your mesh is.
Colision against mesh is also an option, simple or complexe, but a bit more consuming than a simple “bubble”
In a single actor, You probably don’t want multiple Collision enabled componenents. At least not to start with and only enbale additional collision component on per need. Otherwise they may interfere, or not having the right compoenent being hit and therefore not triggering the expected hit.
Id’ suggest to set the Capsule as root, and attach the rest of the stuff to it.
In this projectile, only the “box” has colision. anything else is no colision. just beautification.
The “on hit” can be triggered from both side, but preferably from the moving part.
Also make sure you distinguish component hit, and actor hit : you probably want to focus on the componenent and ecventually call upon some event or interface to spread the hit.
The reason I set the capsule to simulate physics is because the collision shape needs to be bigger than the mesh itself. The capsule is set as the root, and any other meshes are attached without collision, as you suggested. I can also confirm that the physics simulated capsule follows along without just dropping (gravity is disabled, and any forces are applied to the capsule, so the attached meshes just follow along).
I also am generating the hit event from the component, the capsule in my case, as you also suggest.