Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
Re: Need help with a rail gun.
It's probably something to do with the general mass of the actor plus the materials they're made of, versus the sharpness/mass/material/etc. of your own bullet.
Thu Oct 02, 2014 9:40 am
Rhyssia
Joined: Sun Sep 28, 2014 6:04 pm Posts: 13
Re: Need help with a rail gun.
Well, I thought I had something with dissipate.lua but... SceneMan:CastStrengthRay won't return true for MOs
The material I'm using for the bullet is currently- (Velocity 50, Sharpness 30, Mass 5) so... I think I should only need a sharpness of like 2? (1/(VxM))*Structural Integrity(80)*Depth(5) = needed sharpness(1.6). (If I have that right)
Code:
AddMaterial = Material Index = 227 PresetName = RGAmmo Bounce = 0 Friction = 0 StructuralIntegrity = 500000 DensityKGPerVolumeL = 1 GibImpulseLimitPerVolumeL = 1 GibWoundLimitPerVolumeL = 0.1 Priority = 20 Color = Color R = 125 G = 125 B = 125
-edit- It looks like I have two more options to try. Removing/changing the "Carrier" LUA so that the pixel is created 20 pixels before impact. (Right now it creates the MOPixel at V4 for a SceneMan:CastObstacleRay which if I understand should be the last position before the ray hits the object.) or using something like...
Code:
local Vector2 = (Vector(100,0):GetXFlipped(self.HFlipped)):RadRotate(self.RotAngle); self.ray = SceneMan:CastMORay(self.Pos, Vector2, self.RootID, self.Team, 128, false, 1); if self.ray ~= nil then self.object = MovableMan:GetMOFromID(self.ray); end
Now is it possible to get the material an actor is made of through the LUA?
-edit2- Because I dont really want to bump my own post unless I make a breakthrough... So I did find out that SceneMan:GetMOIDPixel calls for 2 numbers in a (#,#) format. Im guessing that's Pos.X, and Pos.Y? I think this might be able to get me the material of the pixel... maybe. I'm pretty much throwing myself down dark alleys trying to get this to work at this point.
-edit3- ...And, it just gets me the MOID of what ever pixel it hits. So kinda useful for something. Just not this.
-edit4- So tried throwing every little thing LUA wise I could think of, will try using an AEmitter instead of LUA and see if it's related to exactly when the MOPixel is created.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum