Jump to content

Yue

Members
  • Content count

    320
  • Joined

  • Last visited

Community Reputation

66 Excellent

1 Follower

About Yue

  • Rank
    Advanced Member
  • Birthday 11/04/1978

Profile Information

  • Gender
    Male
  • Location
    Colombia / Bogotá

Recent Profile Visitors

829 profile views
  1. Hello, I'm trying to create prefabricated with brushes, but when I put the prefabricated one away and try to use it again, the object is deformed and its parts are separated. Any suggestions?
  2. Yue

    Shine on materials?

    Thanks You!! now only reflect the light, the orange vest and the sound protectors.
  3. Yue

    Shine on materials?

    Hi, I want to know how to remove the shine from the materials, it's that my character reflects a lot of shine, it looks like it's made of plastic, and I need it not to reflect the sunlight. Any suggestions?
  4. Yue

    Concern about camera?

    No, I'm telling you what I did and how I put it on the development blog. It is a lightning bolt that comes out of a pivot that is close to the player's neck and if its target is another pivot that is at a certain distance from the character, then the camera is hooked to that second pivot. When the beam collides with a wall, the camera is positioned at the point of collision and when the beam does not collide with anything, it is positioned at the second pivot position. I'm thinking that you can use ToGoPoint, so that the camera moves at a smooth speed and doesn't jump to the second pivot with a single movement. Translated with www.DeepL.com/Translator
  5. Yue

    Concern about camera?

    I'm telling you, I did this. Script.Camara = nil --entity "Camara" Script.Yue = nil --entity "Yue" Script.PivoteCamara = nil --entity "Pivote Camara" Script.Escenario = nil --entity "Escenario" posCamara = Vec3() posPivotePlayer = Vec3() posPivoteCamara = Vec3() function Script:Start() self.Camara:SetRange(0.01, 100) self.Escenario:SetPickMode( Entity.PolygonPick ) self.entity:SetPickMode(0) self.Yue:SetPickMode( 0 ) end function Script:UpdateWorld() local pickinfo = PickInfo() -- Giro Camara GiroCamara(self) -- Colision Camara posCamara = self.Camara:GetPosition(true) posPivotePlayer = self.entity:GetPosition(true) posPivoteCamara = self.PivoteCamara:GetPosition(true) if world:Pick( posPivotePlayer.x, posPivotePlayer.y, posPivotePlayer.z, posPivoteCamara.x, posPivoteCamara.y, posPivoteCamara.z, pickinfo , 0.11, true ) then System:Print("Col OK") self.Camara:SetPosition( pickinfo.position, true ) else --self.Camara:Move(0, 1, 0, true ) System:Print( "Col Not") self.Camara:SetPosition( posPivoteCamara, true ) end --self.Yue:GoToPoint(0, 100, 0 ) end pivote = Vec3() -- Giro Camara libre function GiroCamara(self) --Get the mouse movement local sx = Math:Round(context:GetWidth()/2) local sy = Math:Round(context:GetHeight()/2) local mouseposition = window:GetMousePosition() local dx = mouseposition.x - sx local dy = mouseposition.y - sy --Adjust and set the camera rotation pivote.x = pivote.x + dy / 10.0 pivote.y = pivote.y + dx / 10.0 self.entity:SetRotation(pivote) --Move the mouse to the center of the screen window:SetMousePosition(sx,sy) if pivote.x >= 45 then pivote.x = 45 elseif pivote.x <= -45 then pivote.x = -45 end end
  6. Yue

    Import script

    import("Scripts/Menu.lua")
  7. I have a camera that follows a character from a distance. When the camera collides with a wall using a beam, it is positioned at the point of collision, however after that collision, I need the camera to be reset to its initial position. Any suggestions? Camera in original position when following the player. Camera in position in point Collision with a wall The idea is that after the collision, it will return to its original point smoothly. I welcome any suggestions. function Script:UpdateWorld() local pickinfo = PickInfo() -- Giro Camara GiroCamara(self) -- Colision Camara posCamara = self.Camara:GetPosition(true) posPivote= self.entity:GetPosition(true) if world:Pick( posPivote.x, posPivote.y, posPivote.z, posCamara.x, posCamara.y, posCamara.z, pickinfo , 0, false ) then System:Print("Col OK") self.Camara:SetPosition( pickinfo.position, true ) else --self.Camara:Move(0, 1, 0, true ) System:Print( "Col Not") end end
  8. Yue

    Help me, Collision Camera.

    I'll tell you something, after trial and error, I found out that I had a loaded cube-shaped mesh that was the central pivot of the character, if I use a lightning bolt using a mesh it doesn't work, and I don't understand why. However if I create a cube from the Leadwerks editor and put it as the central pivot point of the character if it works, any suggestions as to why it doesn't work with a loaded mesh? Translated with www.DeepL.com/Translator
  9. Yue

    Help me, Collision Camera.

    The idea is that from the center of the character (Pivot) lightning to the position of the camera, with the aim of recognizing when the camera touches an entity, such as wall or floor.
  10. Hi, can you help me, please? What happens is that I'm throwing a beam from a pivot ("cube") from the center of the character to the camera. The idea is to detect the collision of this beam to stop the movement of the camera when it touches a wall or the ground, but initially I can't detect the end of the beam where this collision should happen, my logic tells me I'm doing well but obviously I'm not. Any suggestions. Translated with www.DeepL.com/Translator Script.Camara = nil --entity "Camara" posCamara = Vec3() pivote = Vec3() posPivote = Vec3() function Script:UpdateWorld() GiroCamara(self) -- Colision Camara posPivote = self.entity:GetPosition(true) posCamara = self.Camara:GetPosition(false) if world:Pick( posPivote.x, posPivote.y, posPivote.z, posCamara.x, posCamara.y, posCamara.z, PickInfo(), 0, true ) then System:Print("Col OK") else System:Print( "Col Not") end end -- Giro Camara libre function GiroCamara(self) --Get the mouse movement local sx = Math:Round(context:GetWidth()/2) local sy = Math:Round(context:GetHeight()/2) local mouseposition = window:GetMousePosition() local dx = mouseposition.x - sx local dy = mouseposition.y - sy --Adjust and set the camera rotation pivote.x = pivote.x + dy / 10.0 pivote.y = pivote.y + dx / 10.0 self.entity:SetRotation(pivote) --Move the mouse to the center of the screen window:SetMousePosition(sx,sy) if pivote.x >= 45 then pivote.x = 45 elseif pivote.x <= -45 then pivote.x = -45 end end
  11. It is possible to change the step height of the character, I want it to be lower to set as if it were a sidewalk, however it seems to be very high as shown in the image.
  12. Yue

    DrawText question

    A possible solution: 100 099 095
  13. Yue

    Pick??

    ventana = Window:Create() lienzo = Context:Create( ventana ) mundo = World:Create() local sol = DirectionalLight:Create() sol:SetRotation(90, 0, 0 ) local camara = Camera:Create() local suelo = Model:Box() suelo:SetScale(5, 0.2, 5 ) suelo:SetPosition( 0, -1, 5 ) --suelo:SetPickMode( 0, true ) local cono = Model:Cone() cono:SetPosition ( 0, 0, 5 ) cono:SetColor (1, 0, 0 ) cono:SetPickMode( 0, true ) camara:SetParent(cono,true) local pis = PickInfo() while true do cono:Turn(1, 0, 0 ) if ventana:Closed() then return false end Time:Update() mundo:Update() mundo:Render() lienzo:Sync() if mundo:Pick(cono:GetPosition(true).x, cono:GetPosition(true).y, cono:GetPosition(true).z , camara:GetPosition(true).x, camara:GetPosition(true).y, camara:GetPosition(true).z, pis,0, true ) then System:Print("Pick Successful") suelo:SetColor( 1, 1, 0 ) else suelo:SetColor( 1, 0, 0 ) end end :)
  14. Yue

    Pick??

    ventana = Window:Create() lienzo = Context:Create( ventana ) mundo = World:Create() local sol = DirectionalLight:Create() sol:SetRotation(90, 0, 0 ) local camara = Camera:Create() local suelo = Model:Box() suelo:SetScale(5, 0.2, 5 ) suelo:SetPosition( 0, -1, 5 ) --suelo:SetPickMode( 0, true ) local cono = Model:Cone() cono:SetPosition ( 0, 0, 5 ) cono:SetColor (1, 0, 0 ) cono:SetPickMode( 0, true ) local pis = PickInfo() while true do if ventana:Closed() then return false end Time:Update() mundo:Update() mundo:Render() lienzo:Sync() if mundo:Pick(cono:GetPosition(true).x, cono:GetPosition(true).y, cono:GetPosition(true).z , 0, -10, 5, pis,0, true ) then System:Print("Pick Successful") suelo:SetColor( 1, 1, 0 ) end end Okay, I'm getting this, the plan is that the beam will turn with the cone to another entity, that's what I think is a possible way to detect a camera collision.
×