Jump to content

Instance or GetPosition making an Entity Really big


funnygamemaker
 Share

Recommended Posts

So Im trying to make a projectile object, that is based on a timer for my game. Im making an instance of the object but when I do and when I set the position it makes the entity really big for some reason.

 

function Script:UpdateWorld()
--self.entity:Turn(self.player:GetPosition(true).x * (Time:GetSpeed() * 0.01), 0, 0)
self.fireratetimer = self.fireratetimer + (Time:GetSpeed()/100)-- timer example 1sec 2sec
self.entity:Point(self.player, 1, 1, 90)
if self.fireratetimer >= self.firerate then
local playerpos = self.player:GetPosition()
local bullet1 = self.bullet:Instance()
bullet1:Show()

bullet1:SetPosition(self.bullet:GetPosition(true))

bullet1:SetRotation(self.entity:GetRotation())

self.fireratetimer = 0
end

 

this is how big it is suppose to be

c1042c2f6f95e11c81f1b86b26961c9d.png

 

here is what it turns out to be in game(sorry for the bad quality of the second pictures, doing print-screen was the only option in testing the game due to the mouse position always staying in the middle, and also its the result I have with print screen on duel monitors.)

 

2df3b55d6b426fec0e2317d629eb0af7.png

~Morgan

Link to comment
Share on other sites

Is the bullet scaled in-editor to values < 1? If so, maybe Instance() starts with a scale of 1. Just a wild guess, don't have access to LE right now...

The csg sphere was scaled 20 in editor for some reason, So I scaled it to 1, but when I create the Instance it still turns really big for some-reason. I just tried making a custom model, and it is still having the same problem, I cant figure out how to solve this.

~Morgan

Link to comment
Share on other sites

So I think i found the problem, the character model that im using was really big, so I resized it in the leadwerks model Editor, so it would be about 6 feet tall. which made the scale factor 0.48, I noticed when I have any child's, in that model, such as emiters, instances...etc... they like to spawn in and become the same size as the original size of the model, before I scaled the main model down

 

this picture is when the model is at its orignal size

c439d7d6d6d7409be38fcad551dd4f10.png

 

this picture is when I resized the model and the emitter is just a child of the model

19de1b7e0d361816ffb02ab552eec205.png

~Morgan

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...