Sign in to follow this  
qMartis

How to freeze plane position

Recommended Posts

 

entity.freezePosition(toggle); 

I try this but maybe I'm wrong with code 

 

veh = mp.vehicles.new(mp.joaat('cargoplane'), new mp.Vector3(1702.69482421875,-2967.266845703125,747.1845092773438));
veh.dimension = gameDimension;
player.call('freezePlane', [veh]);
 
Client side: 
mp.events.add('freezePlane', (plane) => {
    plane.freezePosition(true);
});

Share this post


Link to post
Share on other sites

The location you spawning the plane at, is it within the stream range of your local player?

Share this post


Link to post
Share on other sites
Posted (edited)
9 hours ago, Doom said:

The location you spawning the plane at, is it within the stream range of your local player?

player position is same like plane 

player.position= new mp.Vector3(gameStartedData.vehPositionX[gameDimension]+gameStartedData.sk, gameStartedData.vehPositionY[gameDimension]+gameStartedData.sk1, 747.1845092773438-2)

I tried another way, but plane position z bouncing. Maybe is possible turn off entity gravity ?

setInterval(function() {
veh.position.z = 747.1845092773438;
},1)
Edited by qMartis

Share this post


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.

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.