Particle like protons help?

  • QuentinADay
    19th Sep 2014 Member 0 Permalink

    Is there a way to make a particle go through another like protons do in Lua?

  • nucular
    19th Sep 2014 Member 0 Permalink
    Short answer: No

    Medium answer: No because the collision exception for elements like that is nestled deep inside the code of Simulation.cpp.

    Long answer:
    You could probably do some sorcery in the update function (calculating the new position manually, including collisions with walls and other stuff) from vx and vy and then set the particle x,y position. Figure out how to modify the photon map by yourself.
  • jacob1
    19th Sep 2014 Developer 0 Permalink
    Actually, I added a function to do this recently, sim.can_move(movingElement, destinationElement). See https://github.com/simtr/The-Powder-Toy/blob/develop/src/simulation/Simulation.cpp#L1962 (init_can_move function) for info on what values to set (well, you want 2)
    Edited once by jacob1. Last: 19th Sep 2014
  • RCAProduction
    30th Sep 2014 Member 0 Permalink

    Yep I did this with my NEUR (Neutrinos) in one of my mods.