Slastraf Posted February 20, 2016 Share Posted February 20, 2016 I am asking myself how to make a sphere that intersects with an other object notice that it did ? The problem with that is that, - I need no character physics shape, i want to keep the physics shape of the sphere. - Also I want no collision sice it would make no sense in the game I am currently making. It works with A character physics shape and a trigger, but the cylinder that is the only option with the character mode is not usable as said. To make it clearer, heres a screenshot of my game. It is an endless procedual generated game, the sphere is made visible on purpose. (to see if it should intersect) The Sphere is controlled by the mouse, and when it hits the white object, it has a flickering effect and a life less but not change the movement when colliding. Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 20, 2016 Share Posted February 20, 2016 Just make your own Collision type and response: http://www.leadwerks.com/werkspace/topic/11744-defining-new-collision-constantstypes/#entry84834 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Slastraf Posted February 21, 2016 Author Share Posted February 21, 2016 Just make your own Collision type and response: http://www.leadwerks.com/werkspace/topic/11744-defining-new-collision-constantstypes/#entry84834 function Script:Start() Collision:SetResponse(10, Collision.Prop, Collision.Trigger) self.entity:SetCollisionType(10) end This is what I have inserted in the script which has every obstacle. I added self.entity:Hide() for testing in collision function of the hitbox and the obstacle, both dont work. The physics type of the obstacle is set to trigger , the hitbox to prop in the editor (with the attached scripts) Quote Link to comment Share on other sites More sharing options...
josk Posted February 21, 2016 Share Posted February 21, 2016 Collision Trigger only collides with Collision Character see the link http://www.leadwerks.com/werkspace/page/api-reference/_/command-reference/collision-r778 Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
Slastraf Posted February 21, 2016 Author Share Posted February 21, 2016 Collision Trigger only collides with Collision Character see the link http://www.leadwerks.com/werkspace/page/api-reference/_/command-reference/collision-r778 Yes what Im trying to do is make a new Collision type that makes just that. 1 Quote Link to comment Share on other sites More sharing options...
Slastraf Posted February 21, 2016 Author Share Posted February 21, 2016 bump, need to get it done today Quote Link to comment Share on other sites More sharing options...
josk Posted February 21, 2016 Share Posted February 21, 2016 Player controlled item is set to collision prop, and give it mass. item that gets hit, set to Collision trigger and give mass. SetGravity to nil on both if not needed. In the script.start function of the item being hit put Collision:SetResponse(10,Collision.Prop, Collision.Trigger) self.entity:SetCollisionType(10) in the script.collision function put collisiontype = entity:GetCollisionType() if collisiontype==Collision.Prop then self.entity:Hide() end Also in player item put function Script:Collision(entity, position, normal, speed) collisiontype = entity:GetCollisionType() if collisiontype==10 then self.entity:Hide() end end 1 Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.