Release Notes for 470

Notes for Release 470

36 Likes

Client Difference Log

API Changes

Added Class PluginPolicyService : Instance [NotCreatable] [Service] [NotReplicated]
	Added Function Dictionary PluginPolicyService:GetPluginPolicy(string pluginName) {RobloxScriptSecurity}

Added Class TorsionSpringConstraint : Constraint
	Added Property float TorsionSpringConstraint.Coils
	Added Property float TorsionSpringConstraint.Radius
	Added Property float TorsionSpringConstraint.CurrentAngle [ReadOnly]
	Added Property float TorsionSpringConstraint.MaxAngle
	Added Property float TorsionSpringConstraint.Restitution
	Added Property float TorsionSpringConstraint.Damping
	Added Property bool TorsionSpringConstraint.LimitEnabled
	Added Property float TorsionSpringConstraint.MaxTorque
	Added Property float TorsionSpringConstraint.Stiffness

Added Property CFrame BasePart.PivotOffset
Added Property float CylindricalConstraint.AngularResponsiveness
Added Property float HingeConstraint.AngularResponsiveness
Added Property Vector3 Model.World Pivot Orientation [NotReplicated] [NotScriptable]
Added Property Vector3 Model.World Pivot Position [NotReplicated] [NotScriptable]
Added Property CFrame Model.WorldPivot
Added Property Vector3 PVInstance.Pivot Offset Orientation [NotReplicated] [NotScriptable]
Added Property Vector3 PVInstance.Pivot Offset Position [NotReplicated] [NotScriptable]
Added Property Vector3 PVInstance.Origin Orientation [NotReplicated] [NotScriptable]
Added Property Vector3 PVInstance.Origin Position [NotReplicated] [NotScriptable]
Added Property string PackageLink.Creator [ReadOnly] [NotScriptable]
Added Property string PackageLink.PackageAssetName [ReadOnly] [NotScriptable]
Added Property Enum<PackagePermission> PackageLink.PermissionLevel [ReadOnly] [NotScriptable]
Added Property float SlidingBallConstraint.LinearResponsiveness
Added Property bool StudioService.PivotSnapToGeometry {RobloxScriptSecurity} [Hidden] [ReadOnly]

Added Function CFrame PVInstance:GetPivot()
Added Function void PVInstance:PivotTo(CFrame targetCFrame)
Added Function Objects WorldRoot:GetPartBoundsInBox(CFrame cframe, Vector3 size, OverlapParams overlapParams = OverlapParams.new())
Added Function Objects WorldRoot:GetPartBoundsInRadius(Vector3 position, float radius, OverlapParams overlapParams = OverlapParams.new())
Added Function Objects WorldRoot:GetPartsInPart(Instance part, OverlapParams overlapParams = OverlapParams.new())

Added Event DataModel.ScreenshotSavedToAlbum(string filename, bool success, string message) {RobloxScriptSecurity}

Added Enum PackagePermission
	Added EnumItem PackagePermission.None : 0
	Added EnumItem PackagePermission.NoAccess : 1
	Added EnumItem PackagePermission.Revoked : 2
	Added EnumItem PackagePermission.UseView : 3
	Added EnumItem PackagePermission.Edit : 4
	Added EnumItem PackagePermission.Own : 5

Removed Event StudioService.DEPRECATED_OnPublishPlaceToRoblox

(Click here for a syntax highlighted version!)

12 Likes


FINALLY!! Now there’s no need for any getfenv ugly deoptimization garbage.

10 Likes

Yeah this is huge. I was going to do a tweet about it but got sidetracked by like 30 other things as I usually do. The wording of the release note is a little weird. The “slnfa” string refers to character-based flags that define what information the function should retrieve.

The official description is as follows:

4 Likes
Vector3 PVInstance.Pivot Offset Orientation [NotReplicated] [NotScriptable]
Vector3 PVInstance.Pivot Offset Position [NotReplicated] [NotScriptable]

Since I’m sure that someone will be wondering: These are editor only properties for part of Pivot support, so that you can edit the pivot from the properties pane. They have spaces in them deliberately to hint that they aren’t actually part of the scripting API.

Pivot scripting API TL;DR:

  • The pivot of a Part is a CFrame equal to the part.CFrame * part.PivotOffset

  • The pivot of a model with a PrimaryPart is exactly equal to the PrimaryPart’s pivot

  • The pivot of a model without a PrimaryPart is equal to model.WorldPivot

  • model/part:GetPivot() returns the pivot as a CFrame

  • model/part:PivotTo(target) moves the object such that the pivot is now at target (similar to and replacing SetPrimaryPartCFrame which will be deprecated after full release, but works regardless of whether you set a PrimaryPart)

6 Likes

The Studio class has many properties which have spaces in their names, are they not mean to be part of the scripting API too? Currently these properties can be read and written to by Plugins.

3 Likes

This is simply an artifact of the way the settings dialogue works (the settings dialogue is actually just a properties pane viewing the properties of the settings Instance).

We’re trying to move away from that, and have already resolved to not add any new publicly accessible properties to it, future properties on it will be RobloxScriptSecurity and exposed through a proper Lua API elsewhere if we intend for them to be modifiable by plugins.

7 Likes

fwiw here’s the API proposal for debug.info that has full details

22 Likes

What are these functions exactly? When would they be fully enabled? They sound exactly like what I’m looking for.

3 Likes

I’m super excited for pivots now.
Will :PivotTo() fix any of the performance issues of :SetPrimaryPartCFrame()? Also, how will this behave for welded models? Would only assembly root parts inside of the model be moved?

Also super excited to see the new constraint stuff in there and the collision check stuff.

@hudzell Those functions are going to be ways to perform collision checks. (I can’t find the tweet and it was a bit vague, but, it sounded like box casting and sphere casting are planned separately still).

The first one will basically return all parts physically overlapping a box (basically, think about it like a part’s center CFrame and size).
The second one will return all parts physically overlapping a sphere.
The last one will return all parts overlapping the given part.

Spherecasting, if its still planned, is going to be similar except, it’ll be like a raycast with a radius so you get something similar to two sphere checks on the end and a cylinder check between the two.

I would think you can already perform box casting using GetPartBoundsInBox the same way you would normally position a part over a ray. This could be used to create visually accurate lasers like in older Roblox games (and some newer ones).

I bet, if, Roblox added a version of this for cylinders you could create your own spherecast. You should already be able to do that by using a cylinder part and GetPartsInPart though I would expect that to be potentially slower.

I really hope that each of these will be faster than BasePart:GetTouchingParts(), because, this is the sole reason why my game’s structure placement system can cripple FPS.

I’m super hyped about all of this, because, I suggested sphere casts a bit ago:

3 Likes

Ish? There’s only so much that we can do in this regard because some models are large ones intended for organization only or static model that aren’t going to move, and it would cost a lot to pre-emptively track some kind of metadata for all models as a result. I am looking at making PivotTo only fire CFrame changes like BulkMoveTo does because that would speed it up some and I can’t think of a reason you would need the extra events.

BulkMoveTo will still give you the best performance possible because it leaves it up to you to decide and cache information on exactly what you’re going to be moving.

It will act the same as SetPrimaryPartCFrame: At a minimum all the parts in the Model will be moved, and also anything else indirectly attached to the model with rigid joints.

4 Likes