Jump to content

Toumal

Members
  • Posts

    3
  • Joined

  • Last visited

Toumal's Achievements

  1. Thanks for your hint Steve! Unfortunately this doesn't change a thing about the way the engine handles ghosting of the ribbons. To be sure I tried your way and nothing changed. Also I see that you set a "ribbon" field on your projectile, which does nothing functionally because the projectile class has no ribbon field. I tried adding a ribbon field to the projectile class, but since ribbons are still subject to the standard client/server mechanisms in torque nothing changed either, except for me no longer needing to do mountObject. Right now I'm looking at fritz' multiNodeLaserBeam which I kinda sorta got to work on the latest version of the T3D engine code, however the whole game appears to be freezing at random when I use my own compiled engine. So yeah. A lot of work and failed experimentation for a simple visual effect so far...
  2. Hmm I dunno. It seems I don't even get the update for the first tick, apparently the server has to process that before the client even becomes aware of the new projectile, respectively the ribbon. Right now I'm pondering just doing raycasts and rendering something in the path of that raycast. I dunno if I'll need an engine modification. Let's hope I don't need to, it's been almost 10 years since I worked with the torque engine source. If anyone has any super easy solutions that just work, please do let me know. I'd appreciate the help ^^ EDIT: Another thing I could do is to have the laser effect happen entirely on the client side. I'd just need to send a command to all clients to initiate this. However, I don't know what the overhead is for that, and if that's affecting gameplay... EDIT2: Ok I think clientside is probably the best way to go for the visual effect, as it doesn't have to align 100% with the projectile it's attached to. However, I can't get the ribbons to show up. Is there anything I need to do for clientside ribbons? Right now I'm attaching them to another projectile I'm creating on the client side, is that problematic too?
  3. Hey everyone! I'm trying to use ribbons attached to projectiles as laserbeams. This kinda sorta works, but I'm not entirely happy with it as there are some side effects. Most visibly of all, I'm trying to have a whole bunch of projectiles shoot out from a location in a random pattern, and I'm attaching ribbons to those projectiles. This works okay, but the ribbons only start showing up at a certain distance from the projectile origin point. Since I want the appearance of laser beams, the projectiles have to be quite fast. The faster the projectile, the longer the distance until the ribbon shows up: for (%i = 0; %i < 30; %i++) { %matrix = ""; for(%j = 0; %j < 3; %j++) { %matrix = %matrix @ (getRandom() - 0.5) * 2 * 3.1415926 @ " "; } %mat = MatrixCreateFromEuler(%matrix); %vec = "0.1 0.1 0.1"; %projectile = BulletProjectile; %muzzleVector = MatrixMulVector(%mat, %vec); %muzzleVelocity = VectorScale(%muzzleVector, %projectile.muzzleVelocity); %p = new (Projectile)() { dataBlock = %projectile; initialVelocity = %muzzleVelocity; initialPosition = %position; }; MissionCleanup.add(%p); %ribbon = createRibbon(%proj.client.team.weapontrail, %position); %p.mountObject(%ribbon, 0); I can't for the life of me take a screenshot as the ribbon rendering appears to be heavily FPS dependent, and any time I activate anything in terms of video recording or screenshots they simply disappear completely. Is there anything I can do to fix this? Or should I just stay away from ribbons for laser effects? Is there a good beam resource that works for the current Torque3D version? (All the links I found are dead...)
×
×
  • Create New...