Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

Help here Please.


ЖYueЖ

Question

22 answers to this question

Recommended Posts

  • 1
13 hours ago, Yue said:

I'm thinking about the center of gravity mass of the vehicle, is there any way to modify that center? it looks like it's moving forward towards the engine of a normal car.

Can you post your model with an example?  I don't know why it is so front-heavy.

  • Thanks 1
Link to post
Share on other sites
  • 0


There's something strange going on here. When I put a polymesh the force of gravity does not attract it even though it has 2000 mass. If I put another body type, if it's attracted to gravity.  Something strange is that it only happens in the rear of the vehicle in the front if it goes downwards, without any problem, gives the impression that automatically the center of gravity is in the front, and I don't know how to change that point of gravity to my needs.  

MC.png.8e4d4923bad52920d0f3c3c1c933094a.png

Link to post
Share on other sites
  • 0
2 minutes ago, Yue said:


There's something strange going on here. When I put a polymesh the force of gravity does not attract it even though it has 2000 mass. If I put another body type, if it's attracted to gravity.  Something strange is that it only happens in the rear of the vehicle in the front if it goes downwards, without any problem, gives the impression that automatically the center of gravity is in the front, and I don't know how to change that point of gravity to my needs.  

MC.png.8e4d4923bad52920d0f3c3c1c933094a.png

Polymeshes do no move at all. Even with large mass. Use any option, but not polymesh when you want something to move.

Link to post
Share on other sites
  • 0

I got it.

When I remove the vehicle script the model falls as expected.  So this is a problem in the vehicle system.  And since the vehicle system is being totally rewritten right now there is nothing to do at the moment but wait for 4.5.

Is the scene supposed to look like this in the editor or do I have a bug to hunt?  Why are the tires so far away?

screenshot115.thumb.jpg.60aa5fd916f12b400056e17accfd9765.jpg

 

  • Like 1
Link to post
Share on other sites
  • 0
19 minutes ago, Josh said:

I got it.

When I remove the vehicle script the model falls as expected.  So this is a problem in the vehicle system.  And since the vehicle system is being totally rewritten right now there is nothing to do at the moment but wait for 4.5.

Is the scene supposed to look like this in the editor or do I have a bug to hunt?  Why are the tires so far away?

screenshot115.thumb.jpg.60aa5fd916f12b400056e17accfd9765.jpg

 

Okay, I'll wait for version 4.5 :).

On the tires, I don't know if it's the right way to implement it, what I do is this.

I put on the scene the chassis, and then each tire where it belongs, then I assign the script to the chassis.  When this is done it is not displayed for fractions of a second that the tires run into place when the game is released.

If the rims are this far apart as shown in the picture, you can see that the tyres run to the chassis position, but it is usually very fast. I guess it's not a mistake, just to put the vehicle on the scene with their respective tires in place. 

Kind regards.

Link to post
Share on other sites
  • 0

Code Script Lua Vehicle.

 

script.llanta1 = nil --entity "Llanta 1"
Script.llanta2 = nil --entity "Llanta 2"
Script.llanta3 = nil --entity "Llanta 3"
Script.llanta4 = nil --entity "Llanta 4"


function Script:Start()
	

	
       InitVehiculo(self.entity)


end



function Script:UpdateWorld()
	
	

end



function Script:UpdatePhysics()


         
        self.llanta1:SetMatrix(montaCarga:GetTireMatrix(0))
		self.llanta2:SetMatrix(montaCarga:GetTireMatrix(1))
		self.llanta3:SetMatrix(montaCarga:GetTireMatrix(2))
		self.llanta4:SetMatrix(montaCarga:GetTireMatrix(3))
	
	if window:KeyHit(Key.A ) then

		self.entity:Translate( 0, 15, 0 )
		self.entity:SetRotation(0,-90, 0 )
	end 


	
end


function InitVehiculo( malla )

	montaCarga = Vehicle:Create( malla  )


	local ejePos = 0.6
	local ejeAlt = 0.3
	local posZ   = 1
	local radio  =  0.35
	local ancho  =  0.3



	montaCarga:AddTire( ejePos, -ejeAlt, posZ, 100, radio, ancho, false,200,       2000, 0.01)
	montaCarga:AddTire(  -ejePos,  -ejeAlt, posZ, 100, radio, ancho, false ,200,     2000, 0.01)
	montaCarga:AddTire( ejePos, -ejeAlt, -posZ+0.25 , 100, radio, ancho,false,200,	2000, 0.01)
	montaCarga:AddTire( -ejePos, -ejeAlt, -posZ+0.25 , 100, radio, ancho,false,200, 	2000, 0.01 )
	
	montaCarga:AddAxle(0,1)
    montaCarga:AddAxle(2,3)

	montaCarga:Build()
	montaCarga:SetEngineRunning( false  )
	montaCarga:SetHandBrakes(0)


end

 

Link to post
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
Answer this question...

×   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.

×
×
  • Create New...