Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/10/19 in all areas

  1. For long time i considered to do something with physics in mta. For now doing even simplest things such falling box, tree on flat area looks cartoonish. In my history of i saw few attempts of doing simple physics, mostly it was in closed area without bigger interactions with poor performance due you just can't calculate collision in other way than processLineOfSight, isLineOfSightClear or read directly .col file as Tederis did. I started with something to render things, thats how FBX https://github.com/multitheftauto/mtasa-blue/pull/1093 to bypass default rendering to handle future i'll introduce in future. That's how bullet physics project born, first idea how to use react physics, works simillar but is lighter and general smaller project but 0x416c69 suggested to use bullet. I'll use this topic also to prepare long list of features it contains for future copy paste to PR and wiki page The main assumption is to allow for create multiple world with completly independed simulations, get and set detailed information about current step of simulation, fully control how everything is simulated, quality of collision tests, speed and a lot more. i'm trying keep amount of functions low, because if that most stuff is packed into one function. Syntax and name of some function might change in future or along suggestions. Not all properties supports every physics element, some are only get, other set only, however most of them are set/get Current stage: I already implemented function such a: physics physicsCreateWorld() - responsible for creating new world for simulations, return element which will use later. physics-rigidbody physicsCreateRigidBody( shape-type, mixed arguments ) - creates rigid body which is use to simulation bahaviour of non-static shapes, collisions ( currently only few models in mta can do this in simple way ). physics-rigidbody physicsCreateRigidBodyFromModel( model ) - used to create rigid body directly from collision data taken from gta model. physics-static-collision physicsCreateStaticCollision( shape-type, mixed arguments ) - creates static collision which will not move at all ( it is still possible to move it by Lua script ) physics-shape physicsAddShape( shape-type, mixed arguments ) - if you create compound shape, this function let you add more shapes into static collision or rigid body bool physicsSetProperties( any physics element, physics-property, mixed arguments ) - main function to control physics, rigid bodies, static collisions, shapes. Works in simillar way as handling functions. mixed physicsGetProperties( any physics element, physics-property ) - same as above, but getting properties bool physicsDrawDebug( physics ) - use to visualization of world, must be used in render function bool physicsSetDebugMode( physics-debug-mode, enabled ) - use to turn off/on debugging features bool physicsBuildCollisionFromGTA( physics ) - used to create static collisions in specified world from original collisions, doesn't create whole world instantly, require to move player around world to load collision data. physics-constraint physicsCreateConstraint( physics, physics-rigid-body, physics-rigid-body, constraint-type, mixed arguments ) - use to connecting two or more rigid bodies into one entity bool physicsApplyForce( physics-rigid-body, vector from, vector to ) - pushing rigid body in particular point you choosed. bool physicsApplyCentralForce( physics-rigid-body, vector direction ) - apply force from central position of rigid, it's more like "accelereate", should be used more than once at the some period of time bool physicsApplyCentralImpulse( physics-rigid-body, vector direction ) - setting position from center of rigid bool physicsApplyDamping( physics-rigid-body, float force ) - i'm not sure, but it should slow down velocity and rotation of model by specified amount of units physicsApplyImpulse( physics-rigid-body, vector direction ) - i'm not sure how it works physicsApplyTorque( physics-rigid-body, vector rotation ) - same as physicsApplyCentralForce but for rotation physicsApplyTorqueImpulse( physics-rigid-body, vector rotation ) - setting rotation speed physics-properties: "mass", "position" ,"rotation", "sleepingthresholds", "restitution", "scale" "debugcolor", "filtermask", "filtergroup", "stiffness" `sleepingthresholds` means how slow rigid must move/rotate to sleep, it makes stops moving at all but still can be pushed by other rigids `restitution` bounciness, between 0-1 but accept any value above `stiffness` - for fixed constraint `filtermask` i still figuring out how it work, but should let you use 32 bit mask to set which rigid with which should collide Bullet documentation: https://github.com/bulletphysics/bullet3/blob/master/docs/Bullet_User_Manual.pdf page 13 contains useful information when which shape should be used physics-constraints: "pointtopoint", "hidge", "fixed", "slider" Physics-shapes: "box", "sphere", "capsule", "cone", "cylinder", "heightfieldterrain", "compound", "trianglemesh", "convexhull" `compound` is used for constructing rigid made of various shapes Plans for future: "heightfieldterrain" shape type accept black-white texture for faster creation Support for cloths, soft bodies Media: Videos are availiable at my youtube channel https://www.youtube.com/channel/UC95MpsQ1JppDNpMvl_7c1rg screenshots and gifs of current progress: Documentation i use: https://pybullet.org/Bullet/BulletFull I'm waiting for your suggestions Topic not finishedd
    4 points
  2. Send message to Discord from MTA:SA STEP I. Make a new webhook on your Discord server STEP II. Change the variable to your webhook URL. STEP III. Start the resource, and test it with the /dcmessage <string> command, or use it with another script using the following export: exports.webhook:sendDiscordMessage("string") Download the script here.
    1 point
  3. A few months ago i created a horse script in MTA:SA. I decided to publish it, because i haven't got time to work on it. Its not a working script, it needs some work, i just wrote functions. If you find my script useful, you can donate a few dollars to me on PayPal. Thank you! You can find it on GitHub.
    1 point
  4. Un simplu script in care poti sta afk fara sa fi omorat Video: https://streamable.com/twyuq * 720p deoarece nu am mai stat sa il randez in ae *
    1 point
  5. Hi! I created a script which can send messages from server to Discord on Webhooks. You can find the tutorial in here. A little help if someone wants to log the server messages, commands using the webhook system https://gist.github.com/preilakos/9cf9b63bdc47e1468cdcd045f6e39ca5 Download from GitHub
    1 point
  6. The reason this no longer works is not an issue with the script, it is an update that google has made to youtube, where they limited the type of devices able to use the TV version of youtube. They give a full list of supported devices on this page here: https://support.google.com/youtube/answer/7582560 Unfortunately without something to act as like an emulator, this problem cannot be fixed. MTA can be run on linux, mac, and windows, but in order to emulate a supported device MTA needs to be able to run on something like android, or a smart tv os. Even then mta uses a web browser addition called CEF, which many programs use. It's a version of chromium that can be implemented into really any application. CEF is what gives you your youtube videos in game. Unfortunately that is another breaking point. This is out of MTA's control, and it is out of Tails or Loki's control, so unfortunately this issue cannot be resolved @Varus01 ~ Shay
    1 point
  7. Comigo nunca acontece isso. Mas tente usar isso: setOcclusionsEnabled (false)
    1 point
  8. Thanks everyone for your responses! I'll try and collate the responses this week, and we still need to fully discuss & compare submissions. Expect to hear back with the full results by the 10th of October. edit: might take a little longer!
    1 point
  9. Hey, i reworked mta community webpage. I apologize in advance for my bad english Russia power!
    1 point
  10. Soon we are coming with the New Version 4.1 Prepare your self and Put the bullets by distress because we are going to acheive the best in this new Version , Prepare ur self immediately. Regards , SAUG Staff Team. If any one complainting from any thing feel free to report it in our discord server we glad to hear you there
    1 point
×
×
  • Create New...