View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002091 | FSSCP | FRED | public | 2010-01-13 10:23 | 2010-02-04 09:57 |
| Reporter | SparK | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | not fixable | ||
| Product Version | 3.6.10 | ||||
| Summary | 0002091: Allow floating numbers | ||||
| Description | I would really like to use floating point numbers, that would solve a lot of problems about the camera and object orientations and positions. | ||||
| Tags | floating, math, number, numbers, orientation, physics, point, position | ||||
|
|
Camera and object rotations are already stored in 3x3 float matrices, and positions are already float. |
|
|
not on SEXPs try to set camera rotation to a float using a sexp event |
|
|
Well this is not really a bug and SEXPs can't use floats anyway so I'm really not sure what to do with this one. |
|
|
Just a though here but some of the sexps are already in milliseconds which. Assuming those are converted to float at some point that means it would be possible to provide entries that get converted to float. Now there is the problem of backward compatibility. First sexp I looked at is: set-camera-facing Makes the camera face the given point Takes 3 to 6 arguments... 1: X position to face 2: Y position to face 3: Z position to face (optional) 4: Total turn time (milliseconds) 5: Time to spend accelerating/decelerating (milliseconds) 6: Time to spend decelerating (milliseconds) Now X Y and Z are integers and while you could change them so they are interperted as float it would break compatibility. For example set-camera-facing -->150123 -->200456 -->250789 -->0 -->0 -->0 Now if you converted that to say 3 decimal points would be 150.123, 200.456, 250.789 but would break backward compatibility. However if you add an optional 7th argument (lets call it Boat since it floats) that converts to float 3 decimal places then you might be able to do: set-camera-facing -->150123 -->200456 -->250789 -->0 -->0 -->0 -->true Which would evaluate to 3 decimals without breaking compatibility as if false it would be 150123,200456,250789 instead of 150.123,200.456,250.789. Again haven't looked at the code just had a beer pop that in my head. It might also be hard to implement for some sexps depending on the number of arguments and order they are in. |
|
|
I don't think we can actually do anything here without overhauling the scripting system(s) - closing |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-01-13 10:23 | SparK | New Issue | |
| 2010-01-13 11:07 | SparK | Tag Attached: floating | |
| 2010-01-13 11:07 | SparK | Tag Attached: math | |
| 2010-01-13 11:07 | SparK | Tag Attached: number | |
| 2010-01-13 11:07 | SparK | Tag Attached: numbers | |
| 2010-01-13 11:07 | SparK | Tag Attached: orientation | |
| 2010-01-13 11:07 | SparK | Tag Attached: physics | |
| 2010-01-13 11:07 | SparK | Tag Attached: point | |
| 2010-01-13 11:07 | SparK | Tag Attached: position | |
| 2010-01-14 21:55 | The_E | Note Added: 0011520 | |
| 2010-01-28 20:49 | SparK | Note Added: 0011596 | |
| 2010-01-29 09:57 | karajorma | Note Added: 0011600 | |
| 2010-01-30 07:11 | FUBAR-BDHR | Note Added: 0011604 | |
| 2010-02-04 09:57 | portej05 | Note Added: 0011614 | |
| 2010-02-04 09:57 | portej05 | Status | new => closed |
| 2010-02-04 09:57 | portej05 | Resolution | open => not fixable |