Area for general discussions, where people can rant and chat about anything.

Collision

Collision

Postby TattieBoJangle » 08 Dec 2016, 15:02

Is there a way to get particles to show on collision cant seem to see how lol
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Collision

Postby SolarPortal » 08 Dec 2016, 15:09

Is this needed in a script. Could you describe what your trying to achieve :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Collision

Postby StarFire » 08 Dec 2016, 15:12

Depending upon the type of collision detection employed. In the collision event call the particle spawn commands. I can set you up a simple demo, I think there is a snippet(yellow section) in the script editor. ;)

Code: Select all
function onInit( objID )
   obj = objID
   heightOffset = 1.7;
   
   effectDuration    = 0         -- Time this effect will live in ms( 1000ms = 1sec ) 0 = constant
   particleFile    = "Fire01"    -- this is a *.skyparticle file without the extension
   
   particle.setEffectDuration(effectDuration)
   particle.setEffectFile(particleFile)
   Fx_Data_ID = particle.createSkyParticleFX() -- create the particle template
   x,y,z = entity.getPosition(obj)
   particleFX_ID = particle.spawnSkyParticleEffect(Fx_Data_ID,x,y+heightOffset,z)
end

function onStop(  )
   particle.deleteParticleFX( particleFX_ID );
end
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Collision

Postby TattieBoJangle » 08 Dec 2016, 15:14

for any reason really for example if you have a trigger box and anything that collides with it will trigger a particle, like something as simple as 2 boxes one the trigger and if the other box collides then an explosion would happen sort of thing.
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Collision

Postby StarFire » 08 Dec 2016, 15:16

The script above can be used to set up the particle. Get the position where you want to spawn the particle then enable the particle. Have a play with script and see what you can do and I will help you where you are stuck ;)

Code: Select all
particle.setEmitting(FX_HND, 1);
can be used to stop and start the effect EG.

Code: Select all
function onKeyDown(key)
   particle.setEmitting(particleFX_ID, 1);
end

function onKeyUp(key)
   particle.setEmitting(particleFX_ID, 0);
end
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Collision

Postby TattieBoJangle » 08 Dec 2016, 15:53

I could be doing this wrong but all I get is the practical spawning in the middle (black) and a giant one spawn behind it (black)

Image
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Collision

Postby SolarPortal » 08 Dec 2016, 16:14

That looks like atomicity which is the default Particle Universe file.

Please be aware that not all materials work with PU files, but will once we get another crack at them :)

Whats your script look like :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 13 guests