Jump to content

Search the Community

Showing results for tags 'maths'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 4 results

  1. Any ideas how can I calculate the camera perspective's 4 corners into a flat 2D map? Here's what the camera should see: And here is what should it look like from the outside: I need to calculate the 4 points position
  2. Hello my friends ! I just trying to move an object away when someone fire on it. I created below client and server side codes. Client Side :- addEventHandler("onClientPlayerWeaponFire",root, function (_,_,_,_,_,_,h) if h and getElementType(h) == "vehicle" then triggerServerEvent("onFired",resourceRoot,h) end end ) Server Side :- addEvent("onFired",true) addEventHandler("onFired",root, function (h) setElementVelocity(h,0.1,0.1,0.1) end ) But the problem in here is, when fire in different directions, the velocity / force acted on the vehicle in same direction. Can you please help me to change the force direction of the vehicle according to the fire direction ? I thing maths should be applied in here [ may not :p ]. However, I'm really newbie in some of lua maths. [ math.sine, math.cos, math.tan, math.#%$...BLA.. BLA..]. So, at least little help will very useful !!
  3. Problem: When given a point P (pX, pY, pZ) how do I set an elements rotation R (rX, rY, rZ) (for example: a rocket projectile) so that the element directly faces the point P? Context: Basically I had an idea for a cruise missile script which involves using the camera matrix and getting the point the camera is directly looking at and setting a rocket projectile's rotation to face it. The idea is to have the rocket's rotation always point where the camera is facing so that eventually the rocket will hit or intersect that point. I have no idea how to solve this problem and I am starting to think nobody does. If anyone knows the solution to this problem could you please explain? [EDIT] The point which the rocket faces may change and therefore the rockets direction needs to change which gives me another question: Does this problem involve velocity as well if the rocket needs to change direction mid-flight? I've tried to explain as clearly as possible. If you need any further context / some sort of example in code please ask. Thanks.
  4. Working on a First Person Shooter gamemode, and i found a bug. The event onClientPreRender causes some delay at attachElements. Can somebody reproduce attachElements maths for me?
×
×
  • Create New...