- Joined
- Apr 3, 2010
- Messages
- 1,891
3D Object Collision and Jump System 0.4.0.0 Beta
This system is created to allow you to create physics like a
3rd person shooter with a 3rd dimension to their physics system.
For example if you want want to make a bridge, without this system
you would only be able to go either under or over and not both.
With this you are able to do both at the same time.
Check out the next tab named "Manual" to find out what you can
do with this system.
Content Index:
Using the system in your map:
Attach/Remove a unit (to/from the system):
Create/Remove an object (to/from the system):
Relocate a unit:
Description
Manual!
This system is created to allow you to create physics like a
3rd person shooter with a 3rd dimension to their physics system.
For example if you want want to make a bridge, without this system
you would only be able to go either under or over and not both.
With this you are able to do both at the same time.
Check out the next tab named "Manual" to find out what you can
do with this system.
Playing the map controls:
Change log:
Known bugs:
Ideas:
Credits:
- Use the arrow keys to move
- Use the "Q" hotkey to jump
0.4.0.0 Beta
Older change logs
- Added new function calls for destroying 3D objects,
detaching units from the system and changing the units
coordinates and facing angle
- The system has been completely recoded with structs to
help me with coding the system itself and with this
the code has been cleaned a lot
- Completely removed and scrapped the "Create System Unit"
function (must use the "Attach System Unit" method now)
- Created a manual to help users use the system in their
maps
- Some physics may have been altered for the system
beta .3
beta .2
beta .1
beta 1.0
Main changes:
Minor changes:
- Jumping to hit the min z of an object will no longer
create bugs
- Code has started in construction for creating objects
with polygon figure
- Some documentatio has been fixed
- Alot of notes(for debuging) have been created(for myself)
- Walking off the side of the map creates a fatal error
instead of heavy lag
- This systems code organisation has been changed and
arranges alot to hopefully make things more
convenient and easier
- Collision objects can be created at anytime in the
map instead of being limited to being inbuilt to
one of this systems libraries and only with one
line of code of a call function instead of using text
macros
- Units are able to be created in any part of code
within a map, also able to have custom options
to customise the unit (note: creating a unit inside
an object or creating an object over the unit would
probably bug) this change counts as a fix to bug
no. 6 although adds another known bug
- System now works on any size map without code
modification
- Fixed bug no.2 so you can no longer walk on the bottom
edge of an object and not fall
- Fixed bug no.3 enough for it not to be noticaeble,
with the unit getting stuck while walking along
an object to another, although bugs with objects
next to each other with one or more objects being
stacked on each other still
- Fixed bug no.5 so you can not select nor deselect
units
Main changes:
Minor changes:
- For each object that is checked, they get checked
inside a different function instead of all the code
being checked inside the loop function. This allows
to be able to be less likely to hit the OP limit
and add more object types easily
- A location for each instant is created and moved for
checking height of the ground for the located
coordinates instead of creating a new one for each
check. A global could not be created for this as
once the first instance is over moving it to check
again does not work
- Started my attempt to fix bug #1
- Added some documentation to the Movement
trigger/library (also a little in the
Object Injection trigger/library), fixed a
couple of grammar errors in documentation and
also removed some useless description in the
instructions documentation
- Moved the descriptive logs to a different folder
- Removed efficiency notes
Released into the Lab to help me keep motivated on the system
Note that this was meant to be named just beta .0 (but the damage it done)
The official release to the spell section will probably be called 1.0.0.0 Beta
Note that this was meant to be named just beta .0 (but the damage it done)
The official release to the spell section will probably be called 1.0.0.0 Beta
- If you try walking under an object you will not be
stopped(although your are stopped at the min z of the
object when jumping)
- Edge of object clipping occurs
- Walking off the edge of the map will make your units
model disappear. ((Not tested.) Although it is possible
to create collision objects outside the edge of the map)
- Setting a destructables health % to 0 will not remove the
collision object attached to it
- Creating collision objects with any patch of blizzard water
will create glitching (must have no indication of blizzard water
around objects with this system for this system to function)
- Jumping works half the time when walking down steep cliffs
- (Not tested.) If you try and collide with a thin enough object you
can walk through it
- (Not tested.) Removing a 3D collision objects that is attached to
an destructable before killing the detstructable first will cause bugs
- (A possibility.) Some objects do not register or get destroyed properly
- Unit Movement with mouse clicks (allow disabling of the Camera
Arrow structs to be replaced by the normal camera and movement to
be made by clicks)
- Use plains for collition (will help with unnesesary object clipping)
- Allow sliding along edges of objects to not stop movment with a
thickness limit
- Make sliding on steep cliffs
- Allow usage of triangle like 3D object with z variance
- Add extra function calls with hooking to players that use arrow keys
to move their unit
- Hooking to allow units to have unique values for instance their movement
speed, facing speed and drop and jump rate
- Allow a function call that can call once or multiple times when a unit
enters a 3D objects area and can get the unit that entered
- Have a hack for WE that allows placment of 3D collition objects or
atleast detect the Z value(or fly height like units) of destructables
- Allow objects to be stored into variables and moved after creation
- When destructables are moved that have objects attached to them move
them with the destructable and viseversa
- Store object data into a variable that allows it to be recreated at a
coordinate
All to DeathChef for the code and description and what not.
Ahahaha!
Ahahaha!
Pic no.1:
Pic no.2:
Pic no.3:
Pic no.4:
Content Index:
Importing the system
Attach/Remove a unit (to/from the system):
Attach
Detach Player
Detach Unit
Death Detach
Create/Remove an object (to/from the system):
Create Rectangle Object
Create Rectangle Objects to Destructables
Remove Rectangle Object In Rectangle Area Z
Remove Rectangle Object In Rectangle Area
When Object Destructable Dies
Relocate a Unit:
___Attach/Remove a unit (to/from the system):
Attach
Detach Player
Detach Unit
Death Detach
Create Rectangle Object
Create Rectangle Objects to Destructables
Remove Rectangle Object In Rectangle Area Z
Remove Rectangle Object In Rectangle Area
When Object Destructable Dies
Relocate a Unit:
Using the system in your map:
Copy all folders inbetween the Description comment trigger
and the cutoff comment trigger.
Also copy the Interface and Ingame units to use for your map
It it still under construction on this matter though
Use following function calls.
___
Remember to use Jass New Generation Pack or any other software
available for using vJass
___and the cutoff comment trigger.
Also copy the Interface and Ingame units to use for your map
It it still under construction on this matter though
Use following function calls.
___
Remember to use Jass New Generation Pack or any other software
available for using vJass
Attach/Remove a unit (to/from the system):
This system works based around a single unit at a time for each player.
This unit will-
. be able to collide and walk on the objects created for this system
. be given the ability to jump
. have the owning players vision locked to it
. only be able to be ordered to walk by the arrow keys
Once this unit is detached the player and the unit will resume to defualt.
Attach:
Attaches a pre-existing unit to the system.
If a unit already attached to the system is owned by the same player this
unit will be the new unit attached to this system.
Example of use:
[jass=]call SystemUnit.Attach(GetTriggerUnit(), 'n000', 15, 55)[/code]
Interface Unit = GetTriggerUnit()
Ingame Unit Id = 'n000'
Width (collision) = 14
Height (collision) = 55
Detach Player:
Detaches the unit attached to the system owned by the player.
Once this unit is detached the player and the unit will resume to defualt.
Example of use:
[jass=]call SystemUnit.DetatchPlayer(Player(0))[/code]
Owning Player = Player(0)
Detach Unit:
Detaches the unit attached to the system owned by the player.
Once this unit is detached the player and the unit will resume to defualt.
Example of use:
[jass=]call SystemUnit.Detach(GetTriggerUnit())[/code]
Chosen Unit = GetTriggerUnit()
Death Detach:
(There is no function for this)
Detaches any unit attached to this system when that unit dies.
Once this unit is detached the player and the unit will resume to defualt.
Example of use:
Any unit that is attached to this system when dies will detach on its own.
___This unit will-
. be able to collide and walk on the objects created for this system
. be given the ability to jump
. have the owning players vision locked to it
. only be able to be ordered to walk by the arrow keys
Once this unit is detached the player and the unit will resume to defualt.
Attach:
SystemUnit.Attach takes unit u, integer UnitInterfaceId, real UnitWidth, real UnitHeight returns nothing
Attaches a pre-existing unit to the system.
If a unit already attached to the system is owned by the same player this
unit will be the new unit attached to this system.
Example of use:
[jass=]call SystemUnit.Attach(GetTriggerUnit(), 'n000', 15, 55)[/code]
Interface Unit = GetTriggerUnit()
Ingame Unit Id = 'n000'
Width (collision) = 14
Height (collision) = 55
SystemUnit.DetatchPlayer takes player PlayerId returns nothing
Detaches the unit attached to the system owned by the player.
Once this unit is detached the player and the unit will resume to defualt.
Example of use:
[jass=]call SystemUnit.DetatchPlayer(Player(0))[/code]
Owning Player = Player(0)
SystemUnit.Detach takes unit u returns nothing
Detaches the unit attached to the system owned by the player.
Once this unit is detached the player and the unit will resume to defualt.
Example of use:
[jass=]call SystemUnit.Detach(GetTriggerUnit())[/code]
Chosen Unit = GetTriggerUnit()
SystemUnit.- takes - returns -
(There is no function for this)
Detaches any unit attached to this system when that unit dies.
Once this unit is detached the player and the unit will resume to defualt.
Example of use:
Any unit that is attached to this system when dies will detach on its own.
Create/Remove an object (to/from the system):
For any unit attached to this system it will be able to collide and walk
on top of the objects created and initialized from the map script.
Note: The objects created in this system represent no art form, other
than collision (the actual objects themselves are invicible).
Create:
Creates an object at the specific map coordinations.
Example of use:
[jass=]call OCJSRegisterRectangle_Create(-690, -600, -490, -400, 390, 530)[/code]
(The tree in the test map)
MinX = -690
NaxX = -600
MinY = -490
MaxY = -400
MinZ = 390
MaxZ = 530
Create Attached to Destructables:
Creates objects with the same set dimention values to all destructables
of the set id.
Caution: The destructables that the object is set to cannot take the
the destructables Z value so make sure all of the destructables under the
same value are on the same Z height.
Example of use:
[jass=]globals
private constant integer LVL1_BARRELS = 'B01A'
endglobals
call RectangleObject.CreateAttachedToDests(LVL1_BARRELS, 32, 32, 390, 460)[/code]
(The first level of dest barrels in the test map)
Destructable Id = LVL1_BARRELS
XWidth = 32
YWidth = 32
MinZ = 390
MaxZ = 460
Remove in Rectangle Area Z:
Removes any object inside the specific map coordinations.
Example of use:
[jass=]call RectangleObject.RemoveInRectangleAreaZ(-690, -600, -490, -400, 390, 530)[/code]
(The tree in the test map)
(Destroys any object that intersects with the object rapped around the tree)
MinX = -690
NaxX = -600
MinY = -490
MaxY = -400
MinZ = 390
MaxZ = 530
Remove in Rectangle Area:
Removes any object inside the specific map coordinations.
Example of use:
[jass=]call RectangleObject.RemoveInRectangleArea(-690, -600, -490, -400)[/code]
(The tree in the test map)
(Destroys any object that intersects with the object rapped around the tree
although with no limit of z object coordinate)
MinX = -690
NaxX = -600
MinY = -490
MaxY = -400
On Destructable Death:
(There is no function for this)
When a collition object is attached to a destructable and that destructable
is destroyed, the collition object is destroyed with it.
____on top of the objects created and initialized from the map script.
Note: The objects created in this system represent no art form, other
than collision (the actual objects themselves are invicible).
Create:
RectangleObject.Create takes real MinX, real MaxX, real MinY, real MaxY, real MinZ, real MaxZ returns nothing
Creates an object at the specific map coordinations.
Example of use:
[jass=]call OCJSRegisterRectangle_Create(-690, -600, -490, -400, 390, 530)[/code]
(The tree in the test map)
MinX = -690
NaxX = -600
MinY = -490
MaxY = -400
MinZ = 390
MaxZ = 530
RectangleObject.CreateAttachedToDests takes integer Id, real XSpread, real YSpread, real MinZ, real MaxZ returns nothing
Creates objects with the same set dimention values to all destructables
of the set id.
Caution: The destructables that the object is set to cannot take the
the destructables Z value so make sure all of the destructables under the
same value are on the same Z height.
Example of use:
[jass=]globals
private constant integer LVL1_BARRELS = 'B01A'
endglobals
call RectangleObject.CreateAttachedToDests(LVL1_BARRELS, 32, 32, 390, 460)[/code]
(The first level of dest barrels in the test map)
Destructable Id = LVL1_BARRELS
XWidth = 32
YWidth = 32
MinZ = 390
MaxZ = 460
RectangleObject.RemoveInRectangleAreaZ takes real MinX, real MaxX, real MinY, real MaxY, real MinZ, real MaxZ returns nothing
Removes any object inside the specific map coordinations.
Example of use:
[jass=]call RectangleObject.RemoveInRectangleAreaZ(-690, -600, -490, -400, 390, 530)[/code]
(The tree in the test map)
(Destroys any object that intersects with the object rapped around the tree)
MinX = -690
NaxX = -600
MinY = -490
MaxY = -400
MinZ = 390
MaxZ = 530
RectangleObject.RemoveInRectangleArea takes real MinX, real MaxX, real MinY, real MaxY returns nothing
Removes any object inside the specific map coordinations.
Example of use:
[jass=]call RectangleObject.RemoveInRectangleArea(-690, -600, -490, -400)[/code]
(The tree in the test map)
(Destroys any object that intersects with the object rapped around the tree
although with no limit of z object coordinate)
MinX = -690
NaxX = -600
MinY = -490
MaxY = -400
RectangleObject.- takes - returns -
(There is no function for this)
When a collition object is attached to a destructable and that destructable
is destroyed, the collition object is destroyed with it.
Relocate a unit:
Considering that this system does not allow usage of directly moving any
unit that is attached to it with directly using natives like "SetUnitX"
or "SetUnitPosition", change the units facing angle or FlyHeight, custom
functions have been made to bypass this limitation.
Using these functions should be self explanitry. Just attach the unit to
the function call and any values that you are setting for that unit.
Make sure to "SystemUnit." before the function name so that it is valid to run.
Functions list:
____unit that is attached to it with directly using natives like "SetUnitX"
or "SetUnitPosition", change the units facing angle or FlyHeight, custom
functions have been made to bypass this limitation.
Using these functions should be self explanitry. Just attach the unit to
the function call and any values that you are setting for that unit.
Make sure to "SystemUnit." before the function name so that it is valid to run.
Functions list:
SystemUnit.SetXYZFacing takes unit u, real x, real y, real z, real facing returns nothing
SystemUnit.SetXYFlyHeightFacing takes unit u, real x, real y, real z, real facing returns nothing
SystemUnit.SetXYZ takes unit u, real x, real y, real z returns nothing
SystemUnit.SetXYFlyHeight takes unit u, real x, real y, real z returns nothing
SystemUnit.SetXYFacing takes unit u, real x, real y, real facing returns nothing
SystemUnit.SetXY takes unit u, real x, real y returns nothing
SystemUnit.SetFacing takes unit u, real facing returns nothing
SystemUnit.SetX takes unit u, real x returns nothing
SystemUnit.SetY takes unit u, real y returns nothing
SystemUnit.SetZ takes unit u, real z returns nothing
SystemUnit.SetFlyHeight takes unit u, real z returns nothing
Map versions:
Images:
(new version)
View attachment 3D OCJS 0.4.0.0 Beta.w3x
(old versions)
View attachment 3D OCJS .3 beta.zip
View attachment 3D OCJS .2 beta.w3x
View attachment 3D OCJS .1 beta.w3x
View attachment 3D OCJS 1.0 beta.w3x
View attachment 3D OCJS 0.4.0.0 Beta.w3x
(old versions)
View attachment 3D OCJS .3 beta.zip
View attachment 3D OCJS .2 beta.w3x
View attachment 3D OCJS .1 beta.w3x
View attachment 3D OCJS 1.0 beta.w3x
Images:
Last edited: